mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
local_variables() should not touch unshared env
This commit is contained in:
+2
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user