From bb77cc183732cf68e224398c30d8e38d02cab14c Mon Sep 17 00:00:00 2001 From: ktsj Date: Sun, 21 Apr 2019 02:43:31 +0000 Subject: [PATCH] Add missing tests for p_args git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_pattern_matching.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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