mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Protect irep of ensure.
This commit is contained in:
@@ -1236,6 +1236,12 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user