mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[Doc] Fix a typo around Hash#compare_by_identity
This commit is contained in:
parent
ad0fa53203
commit
5b272a6453
Notes:
git
2021-03-22 21:16:40 +09:00
1 changed files with 2 additions and 2 deletions
4
hash.c
4
hash.c
|
@ -6690,8 +6690,8 @@ env_update(VALUE env, VALUE hash)
|
|||
* ==== User-Defined \Hash Keys
|
||||
*
|
||||
* To be useable as a \Hash key, objects must implement the methods <code>hash</code> and <code>eql?</code>.
|
||||
* Note: this requirement does not apply if the \Hash uses #compare_by_id since comparison will then rely on
|
||||
* the keys' object id instead of <code>hash</code> and <code>eql?</code>.
|
||||
* Note: this requirement does not apply if the \Hash uses #compare_by_identity since comparison will then
|
||||
* rely on the keys' object id instead of <code>hash</code> and <code>eql?</code>.
|
||||
*
|
||||
* \Object defines basic implementation for <code>hash</code> and <code>eq?</code> that makes each object
|
||||
* a distinct key. Typically, user-defined classes will want to override these methods to provide meaningful
|
||||
|
|
Loading…
Reference in a new issue