summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2025-03-07 08:38:51 -0600
committerGitHub <noreply@github.com>2025-03-07 09:38:51 -0500
commit17f6a689629ec3507a79fc156833f329dc641bed (patch)
tree045fe1edac7b43c928a2ed10497817fd3f931caa
parent8774530ce10bbee5b483b4e7283cc263b246125d (diff)
[DOC] Tweaks for Hash#rehash
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12875 Merged-By: peterzhu2118 <peter@peterzhu.ca>
-rw-r--r--hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 32180b3c7e..717a5e9d69 100644
--- a/hash.c
+++ b/hash.c
@@ -1988,8 +1988,9 @@ rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg)
* call-seq:
* rehash -> self
*
- * Rebuilds the hash table by recomputing the hash index for each key;
+ * Rebuilds the hash table for +self+ by recomputing the hash index for each key;
* returns <tt>self</tt>.
+ * Calling this method ensures that the hash table is valid.
*
* The hash table becomes invalid if the hash value of a key
* has changed after the entry was created.