diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-09-01 16:08:42 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-01 16:08:42 -0700 |
commit | 3fde9ef93781585a675b3e7184ad3a51072fb95f (patch) | |
tree | 05d58e88b03b1fa6850cdc418be819337af78784 /vm_insnhelper.c | |
parent | 85dc89c90747d492e5ecbbbfc631a55088195f61 (diff) |
Fix keyword argument separation warning in method_missing
vm_call_method_missing 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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 60d342daad..c65a9e260a 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2408,6 +2408,9 @@ vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, argc = calling->argc+1; ci_entry.flag = VM_CALL_FCALL | VM_CALL_OPT_SEND; + if (orig_ci->flag & VM_CALL_KW_SPLAT) { + ci_entry.flag |= VM_CALL_KW_SPLAT; + } ci_entry.mid = idMethodMissing; ci_entry.orig_argc = argc; ci = &ci_entry; |