Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Set#compare_by_identity?
compare_by_identity?
lib/set.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/set.rb, line 268
def compare_by_identity?
@hash.respond_to?(:compare_by_identity?) && @hash.compare_by_identity?
end
Returns true if the set will compare its elements by their identity. Also see Set#compare_by_identity.