1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simplify setting of VM_CALL_KW_SPLAT in vm_call_method_missing

Pointed out by ko1.
This commit is contained in:
Jeremy Evans 2019-09-01 19:46:19 -07:00
parent ca11a7d74e
commit f58db5a6f5

View file

@ -2407,10 +2407,7 @@ vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
CALLER_SETUP_ARG(reg_cfp, calling, orig_ci, 0);
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.flag = VM_CALL_FCALL | VM_CALL_OPT_SEND | (orig_ci->flag & VM_CALL_KW_SPLAT);
ci_entry.mid = idMethodMissing;
ci_entry.orig_argc = argc;
ci = &ci_entry;