slightly nicer implementation of SplatNode.compileSplattedArray

This commit is contained in:
Jeremy Ashkenas
2010-07-13 22:16:19 -04:00
parent 8c34aff1c5
commit 0b87387fab
5 changed files with 43 additions and 28 deletions

View File

@@ -105,3 +105,11 @@ ok pen is 2
method 1, 2
ok pen is 2
# Array splat expansions with assigns.
nums: [1, 2, 3]
list: [a: 0, nums..., b: 4]
ok a is 0
ok b is 4
ok list.join(' ') is '0 1 2 3 4'