mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-25 14:48:18 -05:00
Merge branch 'master' of http://github.com/jashkenas/coffee-script into refactorTests
This commit is contained in:
@@ -227,4 +227,17 @@ foo = ->
|
||||
for j in [0..7]
|
||||
-> i + j
|
||||
|
||||
eq foo()[3][4](), 7
|
||||
eq foo()[3][4](), 7
|
||||
|
||||
|
||||
# Issue #897: Ensure that plucked function variables aren't leaked.
|
||||
facets = {}
|
||||
list = ['one', 'two']
|
||||
|
||||
(->
|
||||
for entity in list
|
||||
facets[entity] = -> entity
|
||||
)()
|
||||
|
||||
eq typeof entity, 'undefined'
|
||||
eq facets['two'](), 'two'
|
||||
|
||||
@@ -346,6 +346,7 @@ eq ok, new ->
|
||||
### Should `return` implicitly ###
|
||||
### even with trailing comments. ###
|
||||
|
||||
|
||||
#855: execution context for `func arr...` should be `null`
|
||||
(->
|
||||
global = @
|
||||
@@ -355,3 +356,14 @@ eq ok, new ->
|
||||
contextTest.apply null, array
|
||||
contextTest array...
|
||||
)()
|
||||
|
||||
|
||||
# #894: Splatting against constructor-chained functions.
|
||||
x = null
|
||||
|
||||
class Foo
|
||||
bar: (y) -> x = y
|
||||
|
||||
new Foo().bar([101]...)
|
||||
|
||||
eq x, 101
|
||||
Reference in New Issue
Block a user