From 32a555ea532fb15721ad403e6dce0a2ffc346f12 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 12 Jun 2024 19:03:33 +0900 Subject: [Bug #20572] Abandon if replacing destination is the same --- test/ruby/test_iseq.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3