<commit_before>require 'vcr/errors'

module VCR
  class RequestMatcherRegistry
    DEFAULT_MATCHERS = [:method, :uri]

    class Matcher < Struct.new(:callable)
      def matches?(request_1, request_2)
        callable.call(request_1, request_2)
      end
    end

    class URIWithoutParamsMatcher < Struct.new(:params_to_ignore)
      def partial_uri_from(request)
        URI(request.uri).tap do |uri|
          next unless uri.query # ignore uris without params, e.g. "http://example.com/"
<commit_msg>"break" makes more sense then "next" here.<commit_after>require 'vcr/errors'

module VCR
  class RequestMatcherRegistry
    DEFAULT_MATCHERS = [:method, :uri]

    class Matcher < Struct.new(:callable)
      def matches?(request_1, request_2)
        callable.call(request_1, request_2)
      end
    end

    class URIWithoutParamsMatcher < Struct.new(:params_to_ignore)
      def partial_uri_from(request)
        URI(request.uri).tap do |uri|
          break unless uri.query # ignore uris without params, e.g. "http://example.com/"

{'fraction_non_alphanumeric': 0.10076775431861804, 'fraction_numerical': 0.007677543186180422, 'mean_word_length': 3.2745901639344264, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '652266', 'n_tokens_mistral': 328, 'n_tokens_neox': 321, 'n_words': 78}