Should update `ci->env` to share the environment; fix #4073

parent fd086833
...@@ -292,6 +292,7 @@ create_proc_from_string(mrb_state *mrb, char *s, mrb_int len, mrb_value binding, ...@@ -292,6 +292,7 @@ create_proc_from_string(mrb_state *mrb, char *s, mrb_int len, mrb_value binding,
if (ci->argc < 0) bidx = 2; if (ci->argc < 0) bidx = 2;
else bidx += 1; else bidx += 1;
MRB_ENV_SET_BIDX(e, bidx); MRB_ENV_SET_BIDX(e, bidx);
ci->env = e;
} }
proc->e.env = e; proc->e.env = e;
proc->flags |= MRB_PROC_ENVSET; proc->flags |= MRB_PROC_ENVSET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment