From 27ba268b75bbe461460b31426e377b42d4935f70 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Tue, 18 Feb 2025 14:29:27 -0600 Subject: [PATCH] [DOC] Tweaks for Hash#empty? --- hash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hash.c b/hash.c index 3c143141be..fc01651f9a 100644 --- a/hash.c +++ b/hash.c @@ -3017,8 +3017,11 @@ rb_hash_size_num(VALUE hash) * empty? -> true or false * * Returns +true+ if there are no hash entries, +false+ otherwise: + * * {}.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