Fix a couple issues noticed by nobu

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
Jeremy Evans 2024-01-27 11:45:30 -08:00
parent f446d68ba6
commit 334e4c65b3

View File

@ -9520,7 +9520,7 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
/* rest argument */
int idx = local_body->local_table_size - local_body->param.rest_start;
ADD_GETLOCAL(args, node, idx, lvar_level);
ADD_INSN1(args, node, splatarray, local_body->param.flags.has_post ? Qtrue : Qfalse);
ADD_INSN1(args, node, splatarray, RBOOL(local_body->param.flags.has_post));
argc = local_body->param.rest_start + 1;
flag |= VM_CALL_ARGS_SPLAT;
@ -9529,7 +9529,6 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
/* post arguments */
int post_len = local_body->param.post_num;
int post_start = local_body->param.post_start;
flag |= VM_CALL_ARGS_SPLAT_MUT;
if (local_body->param.flags.has_rest) {
int j;
@ -9538,6 +9537,7 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
ADD_GETLOCAL(args, node, idx, lvar_level);
}
ADD_INSN1(args, node, pushtoarray, INT2FIX(j));
flag |= VM_CALL_ARGS_SPLAT_MUT;
/* argc is settled at above */
}
else {