aboutsummaryrefslogtreecommitdiffstats
path: root/vm_args.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_args.c b/vm_args.c
index e6d4981b33..50bb02311d 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -568,14 +568,14 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
rb_raise(rb_eArgError, "no keywords accepted");
}
+
switch (arg_setup_type) {
case arg_setup_method:
break; /* do nothing special */
case arg_setup_block:
if (given_argc == (keyword_hash == Qnil ? 1 : 2) &&
allow_autosplat &&
- (min_argc > 0 || iseq->body->param.opt_num > 1 ||
- iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) &&
+ (min_argc > 0 || iseq->body->param.opt_num > 1) &&
!iseq->body->param.flags.ambiguous_param0 &&
args_check_block_arg0(args)) {
given_argc = RARRAY_LENINT(args->rest);