summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prism_compile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/prism_compile.c b/prism_compile.c
index 799ef636ef..7c9f9ad1f2 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -1562,6 +1562,14 @@ pm_setup_args_core(const pm_arguments_node_t *arguments_node, const pm_node_t *b
if (has_keyword_splat || has_splat) {
*flags |= VM_CALL_KW_SPLAT;
has_keyword_splat = true;
+
+ if (elements->size > 1) {
+ // A new hash will be created for the keyword arguments
+ // in this case, so mark the method as passing mutable
+ // keyword splat.
+ *flags |= VM_CALL_KW_SPLAT_MUT;
+ }
+
pm_compile_hash_elements(iseq, argument, elements, true, ret, scope_node);
}
else {