From 0cdd3bced5e42557ed4ee3c7f3cd35f7f56cbcf0 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 27 Nov 2007 06:54:58 +0000 Subject: * compile.c (iseq_compile_each): "when *[],1" dumps core. a patch from Yusuke ENDOH . [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 --- bootstraptest/test_syntax.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bootstraptest/test_syntax.rb') diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index 5c45c95f94..b25d0d43c9 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 +} + -- cgit v1.2.3