Skip to content

Commit

Permalink
Fix a couple issues noticed by nobu
Browse files Browse the repository at this point in the history
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
  • Loading branch information
jeremyevans and nobu committed Mar 1, 2024
1 parent f446d68 commit 334e4c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compile.c
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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 {
Expand Down

0 comments on commit 334e4c6

Please sign in to comment.