diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_iseq.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 1a1abc627b..2aa6966785 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -434,7 +434,7 @@ class TestISeq < Test::Unit::TestCase end def test_to_binary_pattern_matching - code = "case foo in []; end" + code = "case foo; in []; end" iseq = compile(code) assert_include(iseq.disasm, "TypeError") assert_include(iseq.disasm, "NoMatchingPatternError") diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 1f209b0081..cb87529ccf 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1180,6 +1180,13 @@ END end end end + + ################################################################ + + def test_modifier_in + assert_equal true, (1 in a) + assert_equal 1, a + end end END_of_GUARD $VERBOSE = verbose |