allowing @properties to be referenced in naked interpolations

This commit is contained in:
Jeremy Ashkenas
2010-03-05 21:05:31 -05:00
parent d250e9e9cc
commit 4c3b0b9a74
3 changed files with 19 additions and 7 deletions

View File

@@ -40,3 +40,9 @@ ok "${hello + ' ' + world + '!'}" is 'Hello World!'
list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
ok "values: ${list.join(', ')}, length: ${list.length}." is 'values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, length: 10.'
ok "values: ${list.join ' '}" is 'values: 0 1 2 3 4 5 6 7 8 9'
obj: {
name: 'Joe'
hi: -> "Hello $@name."
}
ok obj.hi() is "Hello Joe."