diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-04 09:19:55 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-04 09:19:55 +0900 |
| commit | 300f97a0d2f5a891a52326473015c92b48de8c4e (patch) | |
| tree | ed04081623ea3606a24d4d780d5a8afc35136097 | |
| parent | f3599bb4423790b674b33ec340433a234965058a (diff) | |
| download | mruby-300f97a0d2f5a891a52326473015c92b48de8c4e.tar.gz mruby-300f97a0d2f5a891a52326473015c92b48de8c4e.zip | |
mrb_closure_new uses current irep's nlocals instead of blocks; a patch from @tociyuki
| -rw-r--r-- | src/proc.c | 2 |
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; |
