mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Using UNDEF_P macro
This commit is contained in:
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
4
dir.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue