From cd8d20cd1fbcf9bf9d438b306beb65b2417fcc04 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 8 Aug 2023 16:06:22 -0700 Subject: YJIT: Compile exception handlers (#8171) Co-authored-by: Maxime Chevalier-Boisvert --- bootstraptest/test_yjit.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 6cc509f212..f90cece848 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -4004,3 +4004,25 @@ assert_equal '[]', %q{ _x, _y = func.call end.call } + +# Catch TAG_BREAK in a non-FINISH frame with JIT code +assert_equal '1', %q{ + def entry + catch_break + end + + def catch_break + while_true do + break + end + 1 + end + + def while_true + while true + yield + end + end + + entry +} -- cgit v1.2.3