From dc9112cf10e63b5272e9469d080d5d1ced30276e Mon Sep 17 00:00:00 2001 From: "S.H" Date: Sun, 3 Oct 2021 22:34:45 +0900 Subject: Using NIL_P macro instead of `== Qnil` --- vm_args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_args.c') diff --git a/vm_args.c b/vm_args.c index 0233671409..58ec4a0826 100644 --- a/vm_args.c +++ b/vm_args.c @@ -604,7 +604,7 @@ 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 == (keyword_hash == Qnil ? 1 : 2) && + if (given_argc == (NIL_P(keyword_hash) ? 1 : 2) && allow_autosplat && (min_argc > 0 || iseq->body->param.opt_num > 1) && !iseq->body->param.flags.ambiguous_param0 && -- cgit v1.2.1