summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
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);