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:
parent
6bc7b56e6e
commit
d5cf339b83
1 changed files with 10 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue