mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Wrong blkargs pos for vararg; ref #3768
This commit is contained in:
@@ -289,7 +289,7 @@ mrb_env_unshare(mrb_state *mrb, struct REnv *e)
|
||||
if (!e->c) {
|
||||
/* save block argument position (negated) */
|
||||
e->cioff = -e->cxt.c->cibase[cioff].argc-1;
|
||||
if (e->cioff == 0) e->cioff = -1;
|
||||
if (e->cioff == 0) e->cioff = -2; /* blkarg position for vararg (1:args, 2:blk) */
|
||||
}
|
||||
e->cxt.mid = e->cxt.c->cibase[cioff].mid;
|
||||
p = (mrb_value *)mrb_malloc(mrb, sizeof(mrb_value)*len);
|
||||
|
||||
Reference in New Issue
Block a user