Propagating exceptions to the caller of Fiber#resume

Need to return control from `mrb_vm_exec()` to the caller if `Fiber#resume` was done from C.
This commit is contained in:
dearblue
2023-12-04 21:51:02 +09:00
parent aaa0f124c3
commit 568309b25a
+4 -1
View File
@@ -2244,7 +2244,10 @@ RETRY_TRY_BLOCK:
mrb->c = c->prev;
if (!mrb->c) mrb->c = mrb->root_c;
else c->prev = NULL;
goto L_RAISE;
if (!c->vmexec) goto L_RAISE;
mrb->jmp = prev_jmp;
if (!prev_jmp) return mrb_obj_value(mrb->exc);
MRB_THROW(prev_jmp);
}
}