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
|
@ -743,7 +743,7 @@ w_ivar(st_index_t num, VALUE ivobj, VALUE encname, struct dump_call_arg *arg)
|
|||
w_object(Qtrue, arg->arg, limit);
|
||||
num--;
|
||||
}
|
||||
if (ivobj != Qundef && num) {
|
||||
if (!UNDEF_P(ivobj) && num) {
|
||||
w_ivar_each(ivobj, num, arg);
|
||||
}
|
||||
}
|
||||
|
@ -930,7 +930,7 @@ w_object(VALUE obj, struct dump_arg *arg, int limit)
|
|||
arg->compat_tbl = rb_init_identtable();
|
||||
}
|
||||
st_insert(arg->compat_tbl, (st_data_t)obj, (st_data_t)real_obj);
|
||||
if (obj != real_obj && ivobj == Qundef) hasiv = 0;
|
||||
if (obj != real_obj && UNDEF_P(ivobj)) hasiv = 0;
|
||||
}
|
||||
}
|
||||
if (hasiv) w_byte(TYPE_IVAR, arg);
|
||||
|
@ -2251,7 +2251,7 @@ r_object_for(struct load_arg *arg, bool partial, int *ivp, VALUE extmod, int typ
|
|||
break;
|
||||
}
|
||||
|
||||
if (v == Qundef) {
|
||||
if (UNDEF_P(v)) {
|
||||
rb_raise(rb_eArgError, "dump format error (bad link)");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue