Created
January 22, 2011 21:06
-
-
Save mynyml/791477 to your computer and use it in GitHub Desktop.
execution scope of _ref in array comprehensions is non-intuitive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bar = -> | |
foo() | |
foo = -> | |
v for k,v of arguments.callee.caller.arguments | |
console.log bar('x','y') #=> ['x','y'] | |
foo = -> | |
args = (v for k,v of arguments.callee.caller.arguments) | |
console.log bar('x','y') #=> [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jashkenas/coffeescript#792