Commit 2eeaab4e authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

do not offset jump from OP_ENTER if no optional argument given

parent 3fb20bc7
......@@ -971,7 +971,9 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
if (r) { /* r */
regs[m1+o+1] = mrb_ary_new_capa(mrb, 0);
}
pc += argc - m1 - m2 + 1;
if (o == 0) pc++;
else
pc += argc - m1 - m2 + 1;
}
else {
memmove(&regs[1], argv, sizeof(mrb_value)*(m1+o)); /* m1 + o */
......
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