Defer `mid` update after `unshift`; ref #3776

parent 9feb0691
......@@ -1393,7 +1393,6 @@ RETRY_TRY_BLOCK:
ERR_PC_SET(mrb, pc);
mrb_method_missing(mrb, mid, recv, args);
}
mid = missing;
if (n != CALL_MAXARGS) {
if (a+2 >= irep->nregs) {
stack_extend(mrb, a+3);
......@@ -1403,6 +1402,7 @@ RETRY_TRY_BLOCK:
n = CALL_MAXARGS;
}
mrb_ary_unshift(mrb, regs[a+1], mrb_symbol_value(mid));
mid = missing;
}
/* push callinfo */
......
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