summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2021-10-03 22:34:45 +0900
committerGitHub <noreply@github.com>2021-10-03 22:34:45 +0900
commitdc9112cf10e63b5272e9469d080d5d1ced30276e (patch)
tree2970b172b25b303dd839fced592564a77eedeab1 /vm_args.c
parentfb03598666ddbb9f8b35eb4f599e75654ca7ca06 (diff)
Using NIL_P macro instead of `== Qnil`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4925 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c2
1 files changed, 1 insertions, 1 deletions
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 &&