summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_iseq.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index 4ff808418f..0af29d9f32 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -770,4 +770,15 @@ class TestISeq < Test::Unit::TestCase
assert_syntax_error("false and break", mesg)
assert_syntax_error("if false and break; end", mesg)
end
+
+ def test_unreachable_pattern_matching
+ assert_in_out_err([], "#{<<~"begin;"}\n#{<<~'end;'}", %w[1])
+ begin;
+ if true or {a: 0} in {a:}
+ p 1
+ else
+ p 0
+ end
+ end;
+ end
end