Passing the arguments object directly when generating a closure.

This commit is contained in:
Timothy Jones
2010-10-24 01:20:16 +13:00
parent e6fb3bcffb
commit 7b887f065d
3 changed files with 12 additions and 11 deletions

View File

@@ -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'