summaryrefslogtreecommitdiff
path: root/bootstraptest/test_syntax.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-27 06:54:58 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-27 06:54:58 +0000
commit0cdd3bced5e42557ed4ee3c7f3cd35f7f56cbcf0 (patch)
treef0d5e98b974ce640da822f0627d152eb4025a2c3 /bootstraptest/test_syntax.rb
parent1bed0ccca83a56dac3a30ecf25a0dd0b3fe66118 (diff)
* compile.c (iseq_compile_each): "when *[],1" dumps core.
a patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32350] * bootstraptest/test_syntax.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_syntax.rb')
-rw-r--r--bootstraptest/test_syntax.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 5c45c95..b25d0d4 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -612,3 +612,15 @@ assert_equal '1', %q{
a = [0]
a[*a]+=1
}
+assert_equal '2', %q{
+ ary = [0]
+ case 1
+ when *ary, 1
+ 1
+ end +
+ case
+ when *ary
+ 1
+ end
+}
+