class RSpec::Matchers::BuiltIn::Match

def can_safely_call_match?(expected, actual)

def can_safely_call_match?(expected, actual)
  return false unless actual.respond_to?(:match)
  !(RSpec::Matchers.is_a_matcher?(expected) &&
    (String === actual || Regexp === actual))
end