diff options
author | Jeremy Evans <[email protected]> | 2024-01-27 11:45:30 -0800 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2024-03-01 07:10:25 -0800 |
commit | 334e4c65b39f8a26a16af776fbccd2b97590211b (patch) | |
tree | 254f148c39def3f6546243811f64a4e6d6caf6a4 /compile.c | |
parent | f446d68ba6f85b08109f258e9153baaa209522a4 (diff) |
Fix a couple issues noticed by nobu
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 { |