summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2026-05-03 22:17:37 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2026-05-03 22:17:37 +0900
commit7f4f3c8ee7cde795dc27be753796fc7ea8318565 (patch)
tree07b3f3eb2af1d2c986ff4da5aa672119ce84232e /test
parentc9b53473e37ec106cb77940b99f5ef0541758e92 (diff)
[Bug #22004] Fix short-circuited loop conditions
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_iseq.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index d7f7043b86..b4760dc412 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -906,6 +906,10 @@ class TestISeq < Test::Unit::TestCase
assert_ruby_status([], "BEGIN {exit}; while true && true; end")
end
+ def test_short_circuited_loop_condition
+ assert_ruby_status([], "while true || true; exit; end; abort")
+ end
+
def test_unreachable_syntax_error
mesg = /Invalid break/
assert_syntax_error("false and break", mesg)