From de29a022acb93691dfc50db852cb04f763565072 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 12 May 2020 18:01:16 -0700 Subject: [PATCH] Document that #hash is not called for certain core classes [ci skip] Fixes [Bug #16850] --- hash.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hash.c b/hash.c index e75a431c09..b7d320f7c2 100644 --- a/hash.c +++ b/hash.c @@ -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 *++