diff options
author | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-12 19:56:53 +0000 |
---|---|---|
committer | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-12 19:56:53 +0000 |
commit | 60990b9a167d744176e35e9185fb477d81a4d3e7 (patch) | |
tree | 272c1bcf4d511b8d9bb8d9d71b2c705198d9a3db /hash.c | |
parent | 1821e9f4dcd21743eabdf188093a9a84de58702f (diff) |
hash.c: improve docs for Hash#{size,length}
* hash.c: [DOC] shorten example code for Hash#{size,length}
and mention aliases at the end; also enable links.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1731,15 +1731,14 @@ 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 + * h.length #=> 3 + * + * Hash#length is an alias for Hash#size. */ VALUE |