class Object
def all_equals(o)
ops = [:==, :===, :eql?, :equal?]
Hash[ops.map(&:to_s).zip(ops.map {|s| send(s, o) })]
end
end
OUTPUT
"a".all_equals "a" # => {"=="=>true, "==="=>true, "eql?"=>true, "equal?"=>false}
Can anyone help me by breaking the code as much as deep can to see how it gave such output?
Just wanted to know the logic how it works to give some output
Thanks