aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 48fbe1f37c..c457923ddf 100644
--- a/hash.c
+++ b/hash.c
@@ -1731,11 +1731,15 @@ rb_hash_replace(VALUE hash, VALUE hash2)
* hsh.size -> integer
*
* Returns the number of key-value pairs in the hash.
+ * <code>Hash#length</code> and <code>Hash#size</code> are both equivalent to
+ * each other.
*
* h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
* h.length #=> 4
+ * h.size #=> 4
* h.delete("a") #=> 200
* h.length #=> 3
+ * h.size #=> 3
*/
VALUE