mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
Passing the arguments object directly when generating a closure.
This commit is contained in:
@@ -70,7 +70,9 @@ ok result.join(' ') is '6 4 2'
|
||||
|
||||
# Closure-wrapped comprehensions that refer to the "arguments" object.
|
||||
expr = ->
|
||||
result = item * item for item in arguments
|
||||
result = for item in arguments
|
||||
ok arguments.callee is expr
|
||||
item * item
|
||||
|
||||
ok expr(2, 4, 8).join(' ') is '4 16 64'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user