summaryrefslogtreecommitdiff
path: root/error.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 /error.c
parentfb03598666ddbb9f8b35eb4f599e75654ca7ca06 (diff)
downloadruby-dc9112cf10e63b5272e9469d080d5d1ced30276e.tar.gz
Using NIL_P macro instead of `== Qnil`
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 84902204d2..65bf1721a2 100644
--- a/error.c
+++ b/error.c
@@ -1986,7 +1986,7 @@ name_err_mesg_to_str(VALUE obj)
break;
default:
d = rb_protect(name_err_mesg_receiver_name, obj, &state);
- if (state || d == Qundef || d == Qnil)
+ if (state || d == Qundef || NIL_P(d))
d = rb_protect(rb_inspect, obj, &state);
if (state) {
rb_set_errinfo(Qnil);