mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Use UNDEF_P
This commit is contained in:
parent
03246171cc
commit
361b3efe16
9 changed files with 45 additions and 45 deletions
|
@ -772,7 +772,7 @@ static VALUE
|
|||
wkmap_aref(VALUE self, VALUE key)
|
||||
{
|
||||
VALUE obj = wkmap_lookup(self, key);
|
||||
return obj != Qundef ? obj : Qnil;
|
||||
return !UNDEF_P(obj) ? obj : Qnil;
|
||||
}
|
||||
|
||||
struct wkmap_aset_args {
|
||||
|
@ -927,7 +927,7 @@ wkmap_getkey(VALUE self, VALUE key)
|
|||
static VALUE
|
||||
wkmap_has_key(VALUE self, VALUE key)
|
||||
{
|
||||
return RBOOL(wkmap_lookup(self, key) != Qundef);
|
||||
return RBOOL(!UNDEF_P(wkmap_lookup(self, key)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue