mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
exception in fiber should make resume to raise in parent fiber context; close #1765
This commit is contained in:
@@ -1300,8 +1300,17 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
|
||||
}
|
||||
else if (ci == mrb->c->cibase) {
|
||||
if (ci->ridx == 0) {
|
||||
regs = mrb->c->stack = mrb->c->stbase;
|
||||
goto L_STOP;
|
||||
if (mrb->c == mrb->root_c) {
|
||||
regs = mrb->c->stack = mrb->c->stbase;
|
||||
goto L_STOP;
|
||||
}
|
||||
else {
|
||||
struct mrb_context *c = mrb->c;
|
||||
|
||||
mrb->c = c->prev;
|
||||
c->prev = NULL;
|
||||
goto L_RAISE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user