1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* compile.c (iseq_compile_each): fix splat condition in NODE_WHEN.

[Bug #2226]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
wanabe 2010-04-17 00:23:28 +00:00
parent 2939d61f28
commit 8b261b413c
3 changed files with 43 additions and 28 deletions

View file

@ -53,6 +53,26 @@ class TestCase < Test::Unit::TestCase
else
assert(false)
end
case
when *[], false
assert(false)
else
assert(true)
end
case
when *false, []
assert(true)
else
assert(false)
end
assert_raise(NameError) do
case
when false, *x, false
end
end
end
def test_deoptimization