Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Hash#compare_by_identity?
hash.compare_by_identity? → true or false
hash.c
View on GitHub ↗
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.