diff options
Diffstat (limited to 'vm_args.c')
-rw-r--r-- | vm_args.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -640,8 +640,9 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co case arg_setup_method: break; /* do nothing special */ case arg_setup_block: - if (given_argc == (NIL_P(keyword_hash) ? 1 : 2) && + if (given_argc == 1 && allow_autosplat && + !splat_flagged_keyword_hash && (min_argc > 0 || ISEQ_BODY(iseq)->param.opt_num > 1) && !ISEQ_BODY(iseq)->param.flags.ambiguous_param0 && !((ISEQ_BODY(iseq)->param.flags.has_kw || |