aboutsummaryrefslogtreecommitdiffstats
path: root/vm_args.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-10-24 12:36:49 -0700
committerJeremy Evans <code@jeremyevans.net>2019-10-24 17:25:43 -0700
commitfb15e79403181098c969b4a8b7e4dd69f820955d (patch)
treec4e8295f873ab6676d500633a0c0cc617d281659 /vm_args.c
parent5040eea959300ecb183d79f9539151239c281aa6 (diff)
downloadruby-fb15e79403181098c969b4a8b7e4dd69f820955d.tar.gz
Handle case where ruby2_keywords method splats to ruby2_keywords method
Previously, the keyword hash was duped (which results in a regular hash), but the dup was not marked as a keyword hash, causing the hash not to be marked as keyword hash even though it should be.
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_args.c b/vm_args.c
index 6fce593bf1..96fce15d62 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -740,6 +740,9 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
rest_last = rb_hash_dup(rest_last);
RARRAY_ASET(args->rest, len - 1, rest_last);
kw_flag |= VM_CALL_KW_SPLAT;
+ if (iseq->body->param.flags.ruby2_keywords) {
+ remove_empty_keyword_hash = 0;
+ }
}
else {
rest_last = 0;