What is the difference between #== and #equal??

Technology CommunityCategory: RubyWhat is the difference between #== and #equal??
VietMX Staff asked 3 years ago

#== performs the generic comparison and is implemented differently across classes while #equal? is defined on BasicObject and compares object identity. Therefore, #equal? should not be overridden in subclasses.