self
# => "a"
o
# => "a"
ops.map(&:to_s)
# => [:==, :===, :eql?, :equal?].map(&:to_s)
# => ["==", "===", "eql?", "equal?"]
ops.map {|s| send(s, o) }
# => [:==, :===, :eql?, :equal?].map {|s| "a".send(s, "a") }
# => ["a".send(:==, "a"), "a".send(:===, "a"), "a".send(:eql?, "a"), "a".send(:equal?, "a")]
# => ["a" == "a", "a" === "a", "a".eql?("a"), "a".equal?("a")]
# => [true, true, true, false]
ops.map(&:to_s).zip(ops.map {|s| send(s, o) })
# => ["==", "===", "eql?", "equal?"].zip([true, true, true, false])
# => [["==", true], ["===", true], ["eql?", true], ["equal?", false]]
Hash[ops.map(&:to_s).zip(ops.map {|s| send(s, o) })]
# => Hash[[["==", true], ["===", true], ["eql?", true], ["equal?", false]]]
# => {"==" => true, "===" => true, "eql?" => true, "equal?" => false}