End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Hash#compare_by_identity?
hash.compare_by_identity? → true or false
hash.c
View on GitHub ↗
MJIT_FUNC_EXPORTED VALUE
rb_hash_compare_by_id_p(VALUE hash)
{
return RBOOL(RHASH_ST_TABLE_P(hash) && RHASH_ST_TABLE(hash)->type == &identhash);
}
Returns true if compare_by_identity has been called, false otherwise.
See also
#compare_by_identity
#deconstruct_keys
#compact!
#default
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0