From 2eb2cdf0deefeb090e9737f86e5c300660bda299 Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Sun, 28 Jul 2013 13:35:00 -0400 Subject: Add a couple splat tests --- test/t/syntax.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') 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 -- cgit v1.2.3