Will
Cannings

Just to show it’s possible. I’d love to see better solutions (and solutions that don’t require storing a binding before the point of call):

def equals(val)
    lambda {|other| other == val}
end

module Handler
    def method_missing(sym, *args)
        args.first.call(eval(sym.to_s, $root))
    end
end
self.extend(Handler)

a = 1
b = 2
$root = binding
# example where a != b
a equals b
=> false

b = 1
$root = binding
# example where a == b
a equals b
=> true