summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-25 06:11:12 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-25 06:11:12 +0000
commitf51983e848a07d0950b3a1b66749c9230da0b35e (patch)
tree31c0f97a77534bbed904e34e16e1fda64b4f8bf5
parent957ce6574c64845ec1d853e6132b0ed92e154a87 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_array.rb7
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a39b663b72..899356f607 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Nov 25 15:06:42 2009 Akinori MUSHA <knu@iDaemons.org>
+
+ * test/ruby/test_array.rb (TestArray#test_splat): Add tests for a
+ recently introduced bug in array splatting.
+
Tue Nov 24 16:18:35 2009 Akinori MUSHA <knu@iDaemons.org>
* ext/digest/lib/md5.rb, ext/digest/lib/sha1.rb: Add an
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