From 42b1e87ba7856f92973924985a63a60b5fa750c8 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 13 Mar 2022 11:37:03 +0900 Subject: merge revision(s) ae5458f228a5477383e9c00425d85d50a3867817: [Backport #18475] thread.c: Convert TAG_BREAK to a normal exception at thread top-level [Bug #18475] --- test/ruby/test_enum.rb | 11 +++++++++++ thread.c | 3 +++ 2 files changed, 14 insertions(+) --- thread.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 6f4be7d62f..59279ef8ff 100644 --- a/thread.c +++ b/thread.c @@ -835,6 +835,9 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start) } else { errinfo = th->ec->errinfo; + VALUE exc = rb_vm_make_jump_tag_but_local_jump(state, Qundef); + if (!NIL_P(exc)) errinfo = exc; + if (state == TAG_FATAL) { if (th->invoke_type == thread_invoke_type_ractor_proc) { rb_ractor_atexit(th->ec, Qnil); -- cgit v1.2.3