public void Scenario_CaseSplatting1() {
TestOutput(@"
[0,2,5,8,6,7,9,4].each do |x|
case x
when 0,1,*[2],*[3,4]; print 0
when *[5]; print 1
when *[6,7]; print 2
when *8; print 3
when *System::Array[Fixnum].new([9]); print 4
end
end
", @"
00132240
");
TestOutput(@"
def t(i)
puts ""t#{i}""
true
end
def f(i)
puts ""f#{i}""
false
end
case
when *[f(1),f(2),f(3)], *[f(4), f(5)]; puts 'a'
when *[t(6)]; puts 'b'
end
", @"
f1
f2
f3
f4
f5
t6
b
");
}