[DOC] Tweaks for Hash#empty?
This commit is contained in:
parent
fd134cf6d2
commit
27ba268b75
Notes:
git
2025-02-18 20:29:44 +00:00
Merged: https://github.com/ruby/ruby/pull/12775 Merged-By: peterzhu2118 <peter@peterzhu.ca>
5
hash.c
5
hash.c
@ -3017,8 +3017,11 @@ rb_hash_size_num(VALUE hash)
|
|||||||
* empty? -> true or false
|
* empty? -> true or false
|
||||||
*
|
*
|
||||||
* Returns +true+ if there are no hash entries, +false+ otherwise:
|
* Returns +true+ if there are no hash entries, +false+ otherwise:
|
||||||
|
*
|
||||||
* {}.empty? # => true
|
* {}.empty? # => true
|
||||||
* {foo: 0, bar: 1, baz: 2}.empty? # => false
|
* {foo: 0}.empty? # => false
|
||||||
|
*
|
||||||
|
* Related: see {Methods for Querying}[rdoc-ref:Hash@Methods+for+Querying].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user