Using UNDEF_P macro

This commit is contained in:
S-H-GAMELINKS 2022-11-15 13:24:08 +09:00 committed by Nobuyoshi Nakada
parent dc1c4e4675
commit 1f4f6c9832
Notes: git 2022-11-16 09:58:53 +00:00
44 changed files with 290 additions and 290 deletions

4
dir.c
View file

@ -2932,7 +2932,7 @@ dir_globs(VALUE args, VALUE base, int flags)
static VALUE
dir_glob_option_base(VALUE base)
{
if (base == Qundef || NIL_P(base)) {
if (UNDEF_P(base) || NIL_P(base)) {
return Qnil;
}
#if USE_OPENDIR_AT
@ -3343,7 +3343,7 @@ rb_dir_s_empty_p(VALUE obj, VALUE dirname)
result = (VALUE)rb_thread_call_without_gvl(nogvl_dir_empty_p, (void *)path,
RUBY_UBF_IO, 0);
if (result == Qundef) {
if (UNDEF_P(result)) {
rb_sys_fail_path(orig);
}
return result;