empty?()
public
Returns true if hsh contains no key-value pairs.
{}.empty?
Show source
/*
* call-seq:
* hsh.empty? => true or false
*
* Returns <code>true</code> if <i>hsh</i> contains no key-value pairs.
*
* {}.empty? #=> true
*
*/
static VALUE
rb_hash_empty_p(hash)
VALUE hash;
{
if (RHASH(hash)->tbl->num_entries == 0)
return Qtrue;
return Qfalse;
}