title: Confusion with the output came from a user-defined instance method calling from IRB
body: <pre><code>class Object
    def all_equals(o)
      ops = [:==, :===, :eql?, :equal?]
      Hash[ops.map(&amp;:to_s).zip(ops.map {|s| send(s, o) })]
    end
  end
  </code></pre>
  
  <p><em><strong>OUTPUT</em></strong></p>
  
  <pre><code>"a".all_equals "a" # =&gt; {"=="=&gt;true, "==="=&gt;true, "eql?"=&gt;true, "equal?"=&gt;false}
  </code></pre>
  
  <p>Can anyone help me by breaking the code as much as deep can to see how it gave such output?</p>
  
  <p>Just wanted to know the logic how it works to give some output</p>
  
  <p>Thanks</p>