This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Complex.eql? (from ruby core) ### Implementation from Numeric --- eql?(other) -> true or false --- Returns `true` if `self` and `other` are the same type and have equal values. Of the Core and Standard Library classes, only Integer, Rational, and Complex use this implementation. Examples: 1.eql?(1) # => true 1.eql?(1.0) # => false 1.eql?(Rational(1, 1)) # => false 1.eql?(Complex(1, 0)) # => false Method `eql?` is different from +==+ in that `eql?` requires matching types, while +==+ does not. (from ruby core) ### Implementation from Object --- obj == other -> true or false obj.equal?(other) -> true or false obj.eql?(other) -> true or false --- Equality --- At the Object level, #== returns `true` only if `obj` and `other` are the same object. Typically, this method is overridden in descendant classes to provide class-specific meaning. Unlike #==, the #equal? method should never be overridden by subclasses as it is used to determine object identity (that is, `a.equal?(b)` if and only if `a` is the same object as `b`): obj = "a" other = obj.dup obj == other #=> true obj.equal? other #=> false obj.equal? obj #=> true The #eql? method returns `true` if `obj` and `other` refer to the same hash key. This is used by Hash to test members for equality. For any pair of objects where #eql? returns `true`, the #hash value of both objects must be equal. So any subclass that overrides #eql? should also override #hash appropriately. For objects of class Object, #eql? is synonymous with #==. Subclasses normally continue this tradition by aliasing #eql? to their overridden #== method, but there are exceptions. Numeric types, for example, perform type conversion across #==, but not across #eql?, so: 1 == 1.0 #=> true 1.eql? 1.0 #=> false
This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.