Skip to content

Commit

Permalink
Document that #hash is not called for certain core classes [ci skip]
Browse files Browse the repository at this point in the history
Fixes [Bug #16850]
  • Loading branch information
jeremyevans committed May 13, 2020
1 parent 9cfa811 commit de29a02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hash.c
Expand Up @@ -315,6 +315,9 @@ objid_hash(VALUE obj)
* implementations of Ruby. If you need a stable identifier across Ruby
* invocations and implementations you will need to generate one with a custom
* 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
*++
Expand Down

0 comments on commit de29a02

Please sign in to comment.