summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2023-12-07 12:16:09 -0800
committerJeremy Evans <[email protected]>2023-12-09 13:15:47 -0800
commitf64357540eabad0f1bfaa6be60710d153325b064 (patch)
treeee39e6ae564d823a53402daaf3c79606e41ad3a7 /compile.c
parenta950f230788d51e13d16596e37cb77e4cc6e2311 (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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index caa6879de6..b345c23691 100644
--- a/compile.c
+++ b/compile.c
@@ -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 */