summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compar.c2
-rw-r--r--dir.c2
-rw-r--r--error.c2
-rw-r--r--io.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/compar.c b/compar.c
index 3635d23e79..040f77975e 100644
--- a/compar.c
+++ b/compar.c
@@ -50,7 +50,7 @@ VALUE
rb_invcmp(VALUE x, VALUE y)
{
VALUE invcmp = rb_exec_recursive(invcmp_recursive, x, y);
- if (UNDEF_P(invcmp) || NIL_P(invcmp)) {
+ if (NIL_OR_UNDEF_P(invcmp)) {
return Qnil;
}
else {
diff --git a/dir.c b/dir.c
index 4d6d80208c..3f73f83fc5 100644
--- a/dir.c
+++ b/dir.c
@@ -2932,7 +2932,7 @@ dir_globs(VALUE args, VALUE base, int flags)
static VALUE
dir_glob_option_base(VALUE base)
{
- if (UNDEF_P(base) || NIL_P(base)) {
+ if (NIL_OR_UNDEF_P(base)) {
return Qnil;
}
#if USE_OPENDIR_AT
diff --git a/error.c b/error.c
index ad1bc6ee8d..e256f3bf37 100644
--- a/error.c
+++ b/error.c
@@ -2084,7 +2084,7 @@ name_err_mesg_to_str(VALUE obj)
break;
default:
d = rb_protect(name_err_mesg_receiver_name, obj, &state);
- if (state || UNDEF_P(d) || NIL_P(d))
+ if (state || NIL_OR_UNDEF_P(d))
d = rb_protect(rb_inspect, obj, &state);
if (state) {
rb_set_errinfo(Qnil);
diff --git a/io.c b/io.c
index 8787c4f804..fa42eeefd0 100644
--- a/io.c
+++ b/io.c
@@ -1424,7 +1424,7 @@ rb_io_wait(VALUE io, VALUE events, VALUE timeout)
struct timeval tv_storage;
struct timeval *tv = NULL;
- if (timeout == Qnil || UNDEF_P(timeout)) {
+ if (NIL_OR_UNDEF_P(timeout)) {
timeout = fptr->timeout;
}