summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2022-03-13 11:37:03 +0900
committernagachika <nagachika@ruby-lang.org>2022-03-13 11:37:03 +0900
commit42b1e87ba7856f92973924985a63a60b5fa750c8 (patch)
tree8fe69cea3dce7e88b29044f0553b8c7126f64a31 /thread.c
parente18e6af604786be481115c7340c1450332615b57 (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 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);