mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
removing the last traces of half-assignments. Issue #541.
This commit is contained in:
@@ -60,8 +60,8 @@ race = ->
|
||||
race()
|
||||
|
||||
# Conditional assignment:
|
||||
good = or evil
|
||||
wine = and cheese
|
||||
good or= evil
|
||||
wine and= cheese
|
||||
|
||||
# Nested property access and calls.
|
||||
((moon.turn(360))).shapes[3].move({x: 45, y: 30}).position['top'].offset('x')
|
||||
|
||||
@@ -12,7 +12,7 @@ class LinkedList
|
||||
# Create a new node object to wrap the data.
|
||||
node = data: data, next: null
|
||||
|
||||
current = this._head = or node
|
||||
current = this._head or= node
|
||||
|
||||
if this._head isnt node
|
||||
(current = current.next) while current.next
|
||||
|
||||
@@ -46,7 +46,7 @@ LotteryDraw =
|
||||
ticket_list.each (ticket) ->
|
||||
score = ticket.score result
|
||||
return if score is 0
|
||||
winners[buyer] = or []
|
||||
winners[buyer] or= []
|
||||
winners[buyer].push [ticket, score]
|
||||
this.tickets = {}
|
||||
winners
|
||||
|
||||
Reference in New Issue
Block a user