PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
BasicObject
U:RDoc::AnyMethod[iI"equal?:ETI"BasicObject#equal?;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"EEquality --- At the Object level, #== returns <code>true</code> ;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"H<code>a.equal?(b)</code> if and only if <code>a</code> is the same ;TI"object as <code>b</code>):;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 <code>true</code> 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_below000[ I" (p1);T@2FI"BasicObject;TcRDoc::NormalClass0[@5FI"==;T
[-] __id__-i.ri
[edit]
[-] equal%3f-i.ri
[edit]
[-] __send__-i.ri
[edit]
[-] %21%3d-i.ri
[edit]
[-] new-c.ri
[edit]
[-] method_missing-i.ri
[edit]
[-] singleton_method_added-i.ri
[edit]
[-] singleton_method_undefined-i.ri
[edit]
[-] singleton_method_removed-i.ri
[edit]
[+]
..
[-] cdesc-BasicObject.ri
[edit]
[-] %3d%3d-i.ri
[edit]
[-] instance_exec-i.ri
[edit]
[-] instance_eval-i.ri
[edit]
[-] %21-i.ri
[edit]