ruby-changes:55443
From: ktsj <ko1@a...>
Date: Sun, 21 Apr 2019 11:43:36 +0900 (JST)
Subject: [ruby-changes:55443] ktsj:r67656 (trunk): Add missing tests for p_args
ktsj 2019-04-21 11:43:31 +0900 (Sun, 21 Apr 2019) New Revision: 67656 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67656 Log: Add missing tests for p_args Modified files: trunk/test/ruby/test_pattern_matching.rb Index: test/ruby/test_pattern_matching.rb =================================================================== --- test/ruby/test_pattern_matching.rb (revision 67655) +++ test/ruby/test_pattern_matching.rb (revision 67656) @@ -547,6 +547,20 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L547 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L640 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/