Do not need to take target_class from the upper proc.

Since it is already set in `mrb_proc_new()`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-12-20 17:26:31 +09:00
parent 73b05f0130
commit 100f0e6759
+1 -1
View File
@@ -69,7 +69,7 @@ closure_setup(mrb_state *mrb, struct RProc *p)
e = ci->env;
}
else {
struct RClass *tc = MRB_PROC_TARGET_CLASS(up);
struct RClass *tc = MRB_PROC_TARGET_CLASS(p);
e = env_new(mrb, up->body.irep->nlocals);
ci->env = e;