From f64357540eabad0f1bfaa6be60710d153325b064 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 7 Dec 2023 12:16:09 -0800 Subject: Ensure super(**kw, &block) calls kw.to_hash before block.to_proc Similar as previous commit, but handles the super case with explicit arguments. --- compile.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compile.c') 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 */ -- cgit v1.2.3