summaryrefslogtreecommitdiffhomepage
path: root/src/proc.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-05-04 09:19:55 +0900
committerYukihiro Matsumoto <[email protected]>2012-05-04 09:19:55 +0900
commit300f97a0d2f5a891a52326473015c92b48de8c4e (patch)
treeed04081623ea3606a24d4d780d5a8afc35136097 /src/proc.c
parentf3599bb4423790b674b33ec340433a234965058a (diff)
downloadmruby-300f97a0d2f5a891a52326473015c92b48de8c4e.tar.gz
mruby-300f97a0d2f5a891a52326473015c92b48de8c4e.zip
mrb_closure_new uses current irep's nlocals instead of blocks; a patch from @tociyuki
Diffstat (limited to 'src/proc.c')
-rw-r--r--src/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proc.c b/src/proc.c
index b77c7342a..c579d8d17 100644
--- a/src/proc.c
+++ b/src/proc.c
@@ -31,7 +31,7 @@ mrb_closure_new(mrb_state *mrb, mrb_irep *irep)
if (!mrb->ci->env) {
e = mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass *) mrb->ci->proc->env);
- e->flags= (unsigned int)irep->nlocals;
+ e->flags= (unsigned int)mrb->ci->proc->body.irep->nlocals;
e->mid = mrb->ci->mid;
e->cioff = mrb->ci - mrb->cibase;
e->stack = mrb->stack;