summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-31 23:05:02 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-31 23:06:49 -0700
commitd646a292cddabfd41593d0b58fd5270e3aeefbb4 (patch)
tree48fbf882cdd12f4877240d8ecc619e09ffb2da04 /vm_insnhelper.c
parente13c0bb82018197d906b8f11eccf2cd90d142e41 (diff)
Fix keyword argument separation warning when using send
vm_call_opt_send was dropping VM_CALL_KW_SPLAT, so this just makes it not drop it, to get the same behavior as calling the method directly.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index ae39472b54..60d342daad 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2310,8 +2310,8 @@ vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct
ci = &ci_entry.ci;
ci_entry.ci = *orig_ci;
}
- unsigned int kw_splat = 0;
- if (ci->flag & VM_CALL_KWARG) {
+ unsigned int kw_splat = ci->flag & VM_CALL_KW_SPLAT;
+ if (!kw_splat && (ci->flag & VM_CALL_KWARG)) {
/* TODO: delegate kw_arg without making a Hash object */
ci->flag = ci->flag & ~VM_CALL_KWARG;
kw_splat = VM_CALL_KW_SPLAT;