ruby-changes:61233
From: Jeremy <ko1@a...>
Date: Wed, 13 May 2020 10:14:48 +0900 (JST)
Subject: [ruby-changes:61233] de29a022ac (master): Document that #hash is not called for certain core classes [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=de29a022ac From de29a022acb93691dfc50db852cb04f763565072 Mon Sep 17 00:00:00 2001 From: Jeremy Evans <code@j...> Date: Tue, 12 May 2020 18:01:16 -0700 Subject: Document that #hash is not called for certain core classes [ci skip] Fixes [Bug #16850] diff --git a/hash.c b/hash.c index e75a431..b7d320f 100644 --- a/hash.c +++ b/hash.c @@ -315,6 +315,9 @@ objid_hash(VALUE obj) https://github.com/ruby/ruby/blob/trunk/hash.c#L315 * 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 *++ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/