diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 6aa7c82361..8e8a7102aa 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -546,6 +546,20 @@ END end end + assert_block do + case [0] + in [0,] + true + end + end + + assert_block do + case [0, 1] + in [0,] + true + end + end + assert_block do case [] in [0, *a] @@ -626,6 +640,21 @@ END a == [1] end end + + assert_block do + case [0] + in [0, *, 1] + else + true + end + end + + assert_block do + case [0, 1] + in [0, *, 1] + true + end + end end def test_hash_pattern