Merge branch 'master' of http://github.com/jashkenas/coffee-script into refactorTests

This commit is contained in:
Michael Ficarra
2010-12-05 22:31:28 -05:00
15 changed files with 115 additions and 76 deletions

View File

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

View File

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