diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-21 02:43:31 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-21 02:43:31 +0000 |
commit | bb77cc183732cf68e224398c30d8e38d02cab14c (patch) | |
tree | a4ec3b4183f91a508db0e9c53f92f3c3b030f49e /test/ruby/test_pattern_matching.rb | |
parent | 1a0990cb143f8988603fe510b8ed840780a77d1f (diff) |
Add missing tests for p_args
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ -547,6 +547,20 @@ 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] else @@ -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 |