vm: execute ensure at the top of the fiber; fix #2903

parent 5b11d519
......@@ -1497,6 +1497,9 @@ RETRY_TRY_BLOCK:
MRB_THROW(prev_jmp);
}
if (ci == mrb->c->cibase) {
while (eidx > 0) {
ecall(mrb, --eidx);
}
if (ci->ridx == 0) {
if (mrb->c == mrb->root_c) {
regs = mrb->c->stack = mrb->c->stbase;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment