1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

adding a test for holmsand's patch for Object.prototype-named variables.

This commit is contained in:
Jeremy Ashkenas 2010-06-16 07:24:17 -04:00
parent 6bc7b56e6e
commit d5cf339b83

View file

@ -154,6 +154,7 @@ result: sum ->
7 + 9
, ->
1 + 3
ok result is 20
# Test more function passing:
@ -167,4 +168,13 @@ ok result is 6
sum: (a, b) -> a + b
result: sum(1
, 2)
ok result is 3
# Assignment to a Object.prototype-named variable should not leak to outer scope.
(->
constructor: 'word'
)()
ok constructor isnt 'word'