mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
The ensure stack may be empty at OP_EPOP; fix 1st part of #3809
This commit is contained in:
@@ -1322,10 +1322,13 @@ RETRY_TRY_BLOCK:
|
||||
mrb_callinfo *ci, *nci;
|
||||
mrb_value self = regs[0];
|
||||
|
||||
/* temporary limitation */
|
||||
mrb_assert(a==1);
|
||||
proc = mrb->c->ensure[--mrb->c->eidx];
|
||||
mrb_assert(a==1); /* temporary limitation */
|
||||
ci = mrb->c->ci;
|
||||
if (mrb->c->eidx == ci->epos) {
|
||||
NEXT;
|
||||
}
|
||||
|
||||
proc = mrb->c->ensure[--mrb->c->eidx];
|
||||
nci = cipush(mrb);
|
||||
nci->mid = ci->mid;
|
||||
nci->argc = 0;
|
||||
|
||||
Reference in New Issue
Block a user