Document that #hash is not called for certain core classes [ci skip]

Fixes [Bug #16850]
This commit is contained in:
Jeremy Evans 2020-05-12 18:01:16 -07:00
parent 9cfa811b0f
commit de29a022ac

3
hash.c
View File

@ -315,6 +315,9 @@ objid_hash(VALUE obj)
* implementations of Ruby. If you need a stable identifier across Ruby * implementations of Ruby. If you need a stable identifier across Ruby
* invocations and implementations you will need to generate one with a custom * invocations and implementations you will need to generate one with a custom
* method. * method.
*
* Certain core classes such as Integer use built-in hash calculations and
* do not call the #hash method when used as a hash key.
*-- *--
* \private * \private
*++ *++