summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2022-01-31 11:16:52 +0900
committerNARUSE, Yui <naruse@airemix.jp>2022-01-31 11:16:52 +0900
commit8e3bce0841497fc00ccdaf45f6583c25720a2d3f (patch)
treeb48036d015292bcfe02898ddda3b5f10bb3c3019 /thread.c
parentabdd655afd6f3f36553e6bb0d6b3e3eac09ae977 (diff)
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(+)
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 36723c6fc0..cf6e89327e 100644
--- a/thread.c
+++ b/thread.c
@@ -830,6 +830,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);