mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
should call ensure before popping callinfo; cancel 8ce1ea84
This commit is contained in:
@@ -811,7 +811,8 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
int a = GETARG_A(i);
|
||||
|
||||
for (n=0; n<a; n++) {
|
||||
ecall(mrb, --mrb->ci->eidx);
|
||||
ecall(mrb, mrb->ci->eidx-1);
|
||||
--mrb->ci->eidx;
|
||||
}
|
||||
mrb_gc_arena_restore(mrb, ai);
|
||||
NEXT;
|
||||
@@ -1283,19 +1284,13 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
/* cannot happen */
|
||||
break;
|
||||
}
|
||||
while (eidx > mrb->ci[-1].eidx) {
|
||||
ecall(mrb, --eidx);
|
||||
}
|
||||
cipop(mrb);
|
||||
acc = ci->acc;
|
||||
pc = ci->pc;
|
||||
regs = mrb->stack = mrb->stbase + ci->stackidx;
|
||||
{
|
||||
int idx = eidx;
|
||||
while (idx > mrb->ci->eidx) {
|
||||
mrb_gc_protect(mrb, mrb_obj_value(mrb->ensure[--idx]));
|
||||
}
|
||||
}
|
||||
while (eidx > mrb->ci->eidx) {
|
||||
ecall(mrb, --eidx);
|
||||
}
|
||||
if (acc < 0) {
|
||||
mrb->jmp = prev_jmp;
|
||||
return v;
|
||||
|
||||
Reference in New Issue
Block a user