diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-05 02:52:34 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-05 02:52:34 +0900 |
| commit | 0b8d8dd379fc5df137477019f0ae355d7a01735f (patch) | |
| tree | d0dc2dd0e5b80dbad037fd2b507f0a59c0eb3995 | |
| parent | 46995c32643fc04d098c095e0f509e08f67c0e38 (diff) | |
| download | mruby-0b8d8dd379fc5df137477019f0ae355d7a01735f.tar.gz mruby-0b8d8dd379fc5df137477019f0ae355d7a01735f.zip | |
associate REnv to the executing block; fix #3214
| -rw-r--r-- | src/vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |
