Unverified Commit 6c5ee8f7 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4866 from shuujii/fix-arguments-check-to-Array-each

Fix arguments check to `Array#each`
parents 9c4c82ed e18aa4d8
......@@ -1304,6 +1304,7 @@ init_ary_each(mrb_state *mrb, struct RClass *ary)
each_irep->nregs = 7;
each_irep->nlocals = 3;
p = mrb_proc_new(mrb, each_irep);
p->flags |= MRB_PROC_SCOPE | MRB_PROC_STRICT;
MRB_METHOD_FROM_PROC(m, p);
mrb_define_method_raw(mrb, ary, mrb_intern_lit(mrb, "each"), m);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment