diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kernel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel.c b/src/kernel.c index 8b1ef80a0..74254e636 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -1078,7 +1078,8 @@ mrb_local_variables(mrb_state *mrb, mrb_value self) struct REnv *e = proc->env; while (e) { - if (!MRB_PROC_CFUNC_P(mrb->c->cibase[e->cioff].proc)) { + if (MRB_ENV_STACK_SHARED_P(e) && + !MRB_PROC_CFUNC_P(mrb->c->cibase[e->cioff].proc)) { irep = mrb->c->cibase[e->cioff].proc->body.irep; if (irep->lv) { for (i = 0; i + 1 < irep->nlocals; ++i) { |
