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

compare_by_identity

        # Hash.compare_by_identity

(from ruby core)
---
    hash.compare_by_identity -> self

---

Sets `self` to consider only identity in comparing keys; two keys are
considered the same only if they are the same object; returns `self`.

By default, these two object are considered to be the same key, so `s1`
will overwrite `s0`:
    s0 = 'x'
    s1 = 'x'
    h = {}
    h.compare_by_identity? # => false
    h[s0] = 0
    h[s1] = 1
    h # => {"x"=>1}

After calling #compare_by_identity, the keys are considered to be
different, and therefore do not overwrite each other:
    h = {}
    h.compare_by_identity # => {}
    h.compare_by_identity? # => true
    h[s0] = 0
    h[s1] = 1
    h # => {"x"=>0, "x"=>1}



      

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.