mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
associate REnv to the executing block; fix #3214
This commit is contained in:
@@ -2298,6 +2298,9 @@ RETRY_TRY_BLOCK:
|
||||
mrb_value recv = regs[a];
|
||||
struct RProc *p;
|
||||
|
||||
/* prepare closure */
|
||||
p = mrb_closure_new(mrb, irep->reps[GETARG_Bx(i)]);
|
||||
|
||||
/* prepare stack */
|
||||
ci = cipush(mrb);
|
||||
ci->pc = pc + 1;
|
||||
@@ -2310,7 +2313,7 @@ RETRY_TRY_BLOCK:
|
||||
/* prepare stack */
|
||||
mrb->c->stack += a;
|
||||
|
||||
p = mrb_proc_new(mrb, irep->reps[GETARG_Bx(i)]);
|
||||
/* setup closure */
|
||||
p->target_class = ci->target_class;
|
||||
ci->proc = p;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user