This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

==

        # Range.==

(from ruby core)
---
    self == other -> true or false

---

Returns `true` if and only if:

*   `other` is a range.
*   `other.begin == self.begin`.
*   `other.end == self.end`.
*   `other.exclude_end? == self.exclude_end?`.


Otherwise returns `false`.

    r = (1..5)
    r == (1..5)                # => true
    r = Range.new(1, 5)
    r == 'foo'                 # => false
    r == (2..5)                # => false
    r == (1..4)                # => false
    r == (1...5)               # => false
    r == Range.new(1, 5, true) # => false

Note that even with the same argument, the return values of #== and
#eql? can differ:

    (1..2) == (1..2.0)   # => true
    (1..2).eql? (1..2.0) # => false

Related: Range#eql?.



      

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.