ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
U:RDoc::AnyMethod[iI" eql?:ETI"Object#eql?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"EEquality --- At the Object level, #== returns true ;TI"Eonly if +obj+ and +other+ are the same object. Typically, this ;TI";method is overridden in descendant classes to provide ;TI"class-specific meaning.;To:RDoc::Markup::BlankLine o;
; [ I"BUnlike #==, the #equal? method should never be overridden by ;TI"Esubclasses as it is used to determine object identity (that is, ;TI"Ha.equal?(b) if and only if a is the same ;TI"object as b):;T@o:RDoc::Markup::Verbatim; [I"obj = "a"
;TI"other = obj.dup
;TI"
;TI" obj == other #=> true
;TI"!obj.equal? other #=> false
;TI" obj.equal? obj #=> true
;T:@format0o;
; [
I"EThe #eql? method returns true if +obj+ and +other+ ;TI"Grefer to the same hash key. This is used by Hash to test members ;TI"Hfor equality. For any pair of objects where #eql? returns +true+, ;TI"Dthe #hash value of both objects must be equal. So any subclass ;TI"Cthat overrides #eql? should also override #hash appropriately.;T@o;
; [
I"7For objects of class Object, #eql? is synonymous ;TI"Hwith #==. Subclasses normally continue this tradition by aliasing ;TI"E#eql? to their overridden #== method, but there are exceptions. ;TI"ENumeric types, for example, perform type conversion across #==, ;TI"but not across #eql?, so:;T@o;; [I"1 == 1.0 #=> true
;TI"1.eql? 1.0 #=> false;T;
0:
@fileI"
object.c;T:0@omit_headings_from_table_of_contents_below0I"tobj == other -> true or false
obj.equal?(other) -> true or false
obj.eql?(other) -> true or false
;T0[ I" (p1);T@2FI"Object;TcRDoc::NormalClass00