aboutsummaryrefslogtreecommitdiffstats
path: root/transcode.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 /transcode.c
parentfb03598666ddbb9f8b35eb4f599e75654ca7ca06 (diff)
downloadruby-dc9112cf10e63b5272e9469d080d5d1ced30276e.tar.gz
Using NIL_P macro instead of `== Qnil`
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transcode.c b/transcode.c
index ec0507ca80..0681288346 100644
--- a/transcode.c
+++ b/transcode.c
@@ -2102,7 +2102,7 @@ make_econv_exception(rb_econv_t *ec)
dumped = rb_sprintf("U+%04X", cc);
}
}
- if (dumped == Qnil)
+ if (NIL_P(dumped))
dumped = rb_str_dump(bytes);
if (strcmp(ec->last_error.source_encoding,
ec->source_encoding_name) == 0 &&
@@ -3121,7 +3121,7 @@ search_convpath_i(const char *sname, const char *dname, int depth, void *arg)
VALUE *ary_p = arg;
VALUE v;
- if (*ary_p == Qnil) {
+ if (NIL_P(*ary_p)) {
*ary_p = rb_ary_new();
}