class Spec::Matchers::OperatorMatcher
def self.use_custom_matcher_or_delegate(operator)
def self.use_custom_matcher_or_delegate(operator) define_method(operator) do |expected| if matcher = OperatorMatcher.get(@actual.class, operator) @actual.send(::Spec::Matchers.last_should, matcher.new(expected)) else eval_match(@actual, operator, expected) end end end