summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_iseq.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index c946d588c1..9429d8bc21 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -813,6 +813,11 @@ class TestISeq < Test::Unit::TestCase
end
def test_unreachable_pattern_matching
+ assert_in_out_err([], "true or 1 in 1")
+ assert_in_out_err([], "true or (case 1; in 1; 1; in 2; 2; end)")
+ end
+
+ def test_unreachable_pattern_matching_in_if_condition
assert_in_out_err([], "#{<<~"begin;"}\n#{<<~'end;'}", %w[1])
begin;
if true or {a: 0} in {a:}