diff options
| author | Carson McDonald <[email protected]> | 2013-07-28 13:35:00 -0400 |
|---|---|---|
| committer | Carson McDonald <[email protected]> | 2013-07-28 13:35:00 -0400 |
| commit | 2eb2cdf0deefeb090e9737f86e5c300660bda299 (patch) | |
| tree | 7f3743af7632548357b016302af011fa8ab5db42 /test/t | |
| parent | ff40793fc726c3d05cbf38ec703d8d39a0dd09df (diff) | |
| download | mruby-2eb2cdf0deefeb090e9737f86e5c300660bda299.tar.gz mruby-2eb2cdf0deefeb090e9737f86e5c300660bda299.zip | |
Add a couple splat tests
Diffstat (limited to 'test/t')
| -rw-r--r-- | test/t/syntax.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb index 332cfcca8..b975d0103 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -65,3 +65,12 @@ assert('Abbreviated variable assignment as returns') do end assert_equal Syntax4AbbrVarAsgnAsReturns::A.new.b, 1 end + +assert('Splat and mass assignment') do + *a = *[1,2,3] + b, *c = *[7,8,9] + + assert_equal [1,2,3], a + assert_equal 7, b + assert_equal [8,9], c +end |
