diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 9af091a5e5..69524cb7a7 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1261,7 +1261,13 @@ END def test_modifier_in assert_equal true, (1 in a) assert_equal 1, a - assert_valid_syntax "p(({} in a:), a:\n 1)" + assert_valid_syntax "p(({} in {a:}), a:\n 1)" + assert_syntax_error(%q{ + 1 in a, b + }, /unexpected/, '[ruby-core:95098]') + assert_syntax_error(%q{ + 1 in a: + }, /unexpected/, '[ruby-core:95098]') end end END_of_GUARD |