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