mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Repalce to NIL_P macro
This commit is contained in:
parent
35c794b26d
commit
f095361758
Notes:
git
2022-08-19 09:48:08 +09:00
3 changed files with 3 additions and 3 deletions
2
parse.y
2
parse.y
|
@ -13612,7 +13612,7 @@ ripper_validate_object(VALUE self, VALUE x)
|
|||
{
|
||||
if (x == Qfalse) return x;
|
||||
if (x == Qtrue) return x;
|
||||
if (x == Qnil) return x;
|
||||
if (NIL_P(x)) return x;
|
||||
if (x == Qundef)
|
||||
rb_raise(rb_eArgError, "Qundef given");
|
||||
if (FIXNUM_P(x)) return x;
|
||||
|
|
|
@ -2605,7 +2605,7 @@ autoload_load_needed(VALUE _arguments)
|
|||
return Qfalse;
|
||||
}
|
||||
|
||||
if (autoload_data->mutex == Qnil) {
|
||||
if (NIL_P(autoload_data->mutex)) {
|
||||
autoload_data->mutex = rb_mutex_new();
|
||||
autoload_data->fork_gen = GET_VM()->fork_gen;
|
||||
}
|
||||
|
|
|
@ -4841,7 +4841,7 @@ vm_objtostring(const rb_iseq_t *iseq, VALUE recv, CALL_DATA cd)
|
|||
// going to use this string for interpolation, it's fine to use the
|
||||
// frozen string.
|
||||
VALUE val = rb_mod_name(recv);
|
||||
if (val == Qnil) {
|
||||
if (NIL_P(val)) {
|
||||
val = rb_mod_to_s(recv);
|
||||
}
|
||||
return val;
|
||||
|
|
Loading…
Reference in a new issue