--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Equality---At the Object level, == returns true only if obj and other are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
- !ruby/struct:SM::Flow::P
body: "Unlike ==, the equal? method should never be overridden by subclasses: it is used to determine object identity (that is, a.equal?(b) iff a is the same object as b)."
- !ruby/struct:SM::Flow::P
body: "The eql? method returns true if obj and anObject have the same value. Used by Hash to test members for equality. For objects of class Object, eql? is synonymous with ==. Subclasses normally continue this tradition, but there are exceptions. Numeric types, for example, perform type conversion across ==, but not across eql?, so:"
- !ruby/struct:SM::Flow::VERB
body: " 1 == 1.0 #=> true\n 1.eql? 1.0 #=> false\n"
full_name: Object#equal?
is_singleton: false
name: equal?
params: |
obj == other => true or false
obj.equal?(other) => true or false
obj.eql?(other) => true or false
visibility: public