mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Using NIL_P macro instead of == Qnil
This commit is contained in:
parent
fb03598666
commit
dc9112cf10
Notes:
git
2021-10-03 22:35:06 +09:00
Merged: https://github.com/ruby/ruby/pull/4925 Merged-By: nobu <nobu@ruby-lang.org>
18 changed files with 43 additions and 43 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue