diff --git a/vm_args.c b/vm_args.c index d1a7695c6e39cc..07e11306125fb5 100644 --- a/vm_args.c +++ b/vm_args.c @@ -725,7 +725,7 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co kw_flag &= ~(VM_CALL_KW_SPLAT | VM_CALL_KW_SPLAT_MUT); } else { - if (!(kw_flag & VM_CALL_KW_SPLAT_MUT)) { + if (!(kw_flag & VM_CALL_KW_SPLAT_MUT) && !ISEQ_BODY(iseq)->param.flags.has_kw) { converted_keyword_hash = rb_hash_dup(converted_keyword_hash); }