mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
ci may be moved during mrb_convert_type(); ref #3474
This commit is contained in:
@@ -1387,6 +1387,8 @@ RETRY_TRY_BLOCK:
|
||||
ci->mid = mid;
|
||||
ci->proc = m;
|
||||
ci->stackent = mrb->c->stack;
|
||||
ci->target_class = c;
|
||||
ci->pc = pc + 1;
|
||||
{
|
||||
int bidx;
|
||||
mrb_value blk;
|
||||
@@ -1402,10 +1404,9 @@ RETRY_TRY_BLOCK:
|
||||
blk = regs[bidx];
|
||||
if (!mrb_nil_p(blk) && mrb_type(blk) != MRB_TT_PROC) {
|
||||
regs[bidx] = mrb_convert_type(mrb, blk, MRB_TT_PROC, "Proc", "to_proc");
|
||||
ci = mrb->c->ci;
|
||||
}
|
||||
}
|
||||
ci->target_class = c;
|
||||
ci->pc = pc + 1;
|
||||
|
||||
/* prepare stack */
|
||||
mrb->c->stack += a;
|
||||
|
||||
Reference in New Issue
Block a user