summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-06-12 19:03:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-06-12 19:57:50 +0900
commit32a555ea532fb15721ad403e6dce0a2ffc346f12 (patch)
tree4a75bb367995945d452b083655c0422e5c7b14cd /test
parent278a7cb057cd7fed2a6284f727c38a1182a31668 (diff)
[Bug #20572] Abandon if replacing destination is the same
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_iseq.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index 1c7de5bb2b..267c0c83dc 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -871,4 +871,12 @@ class TestISeq < Test::Unit::TestCase
RubyVM::InstructionSequence.load_from_binary(var_0)
end
end
+
+ def test_while_in_until_condition
+ assert_in_out_err(["--dump=i", "-e", "until while 1; end; end"]) do |stdout, stderr, status|
+ assert_include(stdout.shift, "== disasm:")
+ assert_include(stdout.pop, "leave")
+ assert_predicate(status, :success?)
+ end
+ end
end