summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_args.c b/vm_args.c
index 3305b9bd33..92e141bf6e 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -609,6 +609,10 @@ 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)) {
+ converted_keyword_hash = rb_hash_dup(converted_keyword_hash);
+ }
+
if (last_arg != converted_keyword_hash) {
last_arg = converted_keyword_hash;
args->argv[args->argc-1] = last_arg;