class RSpec::Matchers::BuiltIn::Include

def perform_match(predicate, hash_predicate, actuals, expecteds)

def perform_match(predicate, hash_predicate, actuals, expecteds)
  expecteds.__send__(predicate) do |expected|
    if comparing_hash_values?(actuals, expected)
      expected.__send__(hash_predicate) { |k,v|
        actuals.has_key?(k) && actuals[k] == v
      }
    elsif comparing_hash_keys?(actuals, expected)
      actuals.has_key?(expected)
    elsif comparing_with_matcher?(actual, expected)
      actual.any? { |value| expected.matches?(value) }
    else
      actuals.include?(expected)
    end
  end
end