End of Life Ruby 3.2 has reached end of life and gets no more fixes. 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.2.0/lib/set.rb, line 259
def compare_by_identity
if @hash.respond_to?(:compare_by_identity)
@hash.compare_by_identity
self
else
raise NotImplementedError, "#{self.class.name}\##{__method__} is not implemented"
end
end
Makes the set compare its elements by their identity and returns self. This method may not be supported by all subclasses of Set.