[DOC] Tweaks for Hash#rehash

This commit is contained in:
Burdette Lamar 2025-03-07 08:38:51 -06:00 committed by GitHub
parent 8774530ce1
commit 17f6a68962
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-03-07 14:39:10 +00:00
Merged: https://github.com/ruby/ruby/pull/12875

Merged-By: peterzhu2118 <peter@peterzhu.ca>

3
hash.c
View File

@ -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.