Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/vm_args.c b/vm_args.c
- index 6fce593bf1..4ae0d6d7fc 100644
- --- a/vm_args.c
- +++ b/vm_args.c
- @@ -735,15 +735,7 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
- rest_last = RARRAY_AREF(args->rest, len - 1);
- if (!kw_flag && len > 0) {
- - if (RB_TYPE_P(rest_last, T_HASH) &&
- - (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
- - rest_last = rb_hash_dup(rest_last);
- - RARRAY_ASET(args->rest, len - 1, rest_last);
- - kw_flag |= VM_CALL_KW_SPLAT;
- - }
- - else {
- - rest_last = 0;
- - }
- + rest_last = 0;
- }
- if (kw_flag & VM_CALL_KW_SPLAT) {
- diff --git a/vm_insnhelper.c b/vm_insnhelper.c
- index c7dd213035..16df7c9fa0 100644
- --- a/vm_insnhelper.c
- +++ b/vm_insnhelper.c
- @@ -1790,12 +1790,6 @@ CALLER_SETUP_ARG(struct rb_control_frame_struct *restrict cfp,
- * So, ci->flag & VM_CALL_ARGS_SPLAT is now inconsistent.
- */
- vm_caller_setup_arg_splat(cfp, calling);
- - if (!IS_ARGS_KW_OR_KW_SPLAT(ci) &&
- - calling->argc > 0 &&
- - RB_TYPE_P(*(cfp->sp - 1), T_HASH) &&
- - (((struct RHash *)*(cfp->sp - 1))->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
- - calling->kw_splat = 1;
- - }
- }
- if (UNLIKELY(IS_ARGS_KEYWORD(ci))) {
- /* This converts VM_CALL_KWARG style to VM_CALL_KW_SPLAT style
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement