diff options
Diffstat (limited to 'vm_args.c')
-rw-r--r-- | vm_args.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -504,6 +504,11 @@ ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq, unsigned if (!RB_TYPE_P(keyword_hash, T_HASH)) { keyword_hash = rb_to_hash_type(keyword_hash); } + else if (UNLIKELY(ISEQ_BODY(iseq)->param.flags.anon_kwrest)) { + if (!ISEQ_BODY(iseq)->param.flags.has_kw) { + *kw_flag |= VM_CALL_KW_SPLAT_MUT; + } + } if (!(*kw_flag & VM_CALL_KW_SPLAT_MUT) && (ISEQ_BODY(iseq)->param.flags.has_kwrest || @@ -590,12 +595,6 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co } } - if (UNLIKELY(ISEQ_BODY(iseq)->param.flags.anon_kwrest)) { - if (kw_flag & VM_CALL_KW_SPLAT) { - kw_flag |= VM_CALL_KW_SPLAT_MUT; - } - } - if (kw_flag & VM_CALL_KWARG) { args->kw_arg = vm_ci_kwarg(ci); |