Merge pull request #4039 from i110/i110/fix-broken-lexical-variables

fix broken lexical variables
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-06-07 16:02:30 +09:00
committed by GitHub
2 changed files with 16 additions and 2 deletions
-2
View File
@@ -528,8 +528,6 @@ mrb_exec_irep(mrb_state *mrb, mrb_value self, struct RProc *p)
return MRB_PROC_CFUNC(p)(mrb, self);
}
ci->nregs = p->body.irep->nregs;
ci->env = MRB_PROC_ENV(p);
if (ci->env) ci->env->stack[0] = self;
if (ci->argc < 0) keep = 3;
else keep = ci->argc + 2;
if (ci->nregs < keep) {