summaryrefslogtreecommitdiffstats
path: root/bootstraptest/test_method.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-21 20:45:35 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-21 20:45:35 +0000
commit6074368b39717341fcdcc349d3b7fecfd9b51e93 (patch)
tree2fe4e0593d2edeab36292edbce28d7b32f69911c /bootstraptest/test_method.rb
parent4d2c9ae2e4376321246b3aa6aa08e96d64614e02 (diff)
downloadruby-6074368b39717341fcdcc349d3b7fecfd9b51e93.tar.gz
ruby-6074368b39717341fcdcc349d3b7fecfd9b51e93.tar.xz
ruby-6074368b39717341fcdcc349d3b7fecfd9b51e93.zip
* parse.y (arg_concat_gen): concat target node should be NODE_ARRAY.
[ruby-core:19413] * bootstraptest/test_method.rb: add tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r--bootstraptest/test_method.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 63c6ad2db..33e7436e6 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -1069,3 +1069,18 @@ assert_equal 'ok', %q{
break :ok
end
}, '[ruby-dev:36028]'
+
+assert_equal '[1, 2, [3, 4]]', %q{
+ def regular(a, b, *c)
+ [a, b, c]
+ end
+ regular(*[], 1, *[], *[2, 3], *[], 4)
+}, '[ruby-core:19413]'
+
+assert_equal '[1, [:foo, 3, 4, :foo]]', %q{
+ def regular(a, *b)
+ [a, b]
+ end
+ a = b = [:foo]
+ regular(1, *a, *[3, 4], *b)
+}