From f51983e848a07d0950b3a1b66749c9230da0b35e Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 25 Nov 2009 06:11:12 +0000 Subject: * test/ruby/test_array.rb (TestArray#test_splat): Add tests for a recently introduced bug in array splatting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_array.rb') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 5e3cf63141..02733b941a 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1276,4 +1276,11 @@ class TestArray < Test::Unit::TestCase def test_drop_while assert_equal([3,4,5,0], [1,2,3,4,5,0].drop_while {|i| i < 3 }) end + + def test_splat + a = [2,3] + assert_equal([1,2,3], [1, *a]) + a = [2,3] + assert_equal([2,3], [*a]) + end end -- cgit v1.2.3