Method: Hash#empty?
- Defined in:
- hash.c
#empty? ⇒ Boolean
Returns true if hsh contains no key-value pairs.
{}.empty? #=> true
1653 1654 1655 1656 1657 |
# File 'hash.c', line 1653 static VALUE rb_hash_empty_p(VALUE hash) { return RHASH_EMPTY_P(hash) ? Qtrue : Qfalse; } |