diff options
author | Jeremy Evans <[email protected]> | 2023-12-07 12:16:09 -0800 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2023-12-09 13:15:47 -0800 |
commit | f64357540eabad0f1bfaa6be60710d153325b064 (patch) | |
tree | ee39e6ae564d823a53402daaf3c79606e41ad3a7 /compile.c | |
parent | a950f230788d51e13d16596e37cb77e4cc6e2311 (diff) |
Ensure super(**kw, &block) calls kw.to_hash before block.to_proc
Similar as previous commit, but handles the super case with
explicit arguments.
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -9229,6 +9229,9 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i VALUE vargc = setup_args(iseq, args, RNODE_SUPER(node)->nd_args, &flag, &keywords); CHECK(!NIL_P(vargc)); argc = FIX2INT(vargc); + if ((flag & VM_CALL_ARGS_BLOCKARG) && (flag & VM_CALL_KW_SPLAT) && !(flag & VM_CALL_KW_SPLAT_MUT)) { + ADD_INSN(args, node, splatkw); + } } else { /* NODE_ZSUPER */ |