<commit_before>module RSpec
  module Matchers
    module BuiltIn
      # @api private
      # Provides the implementation for `match`.
      # Not intended to be instantiated directly.
      class Match < BaseMatcher
        def initialize(expected)
          super(expected)

          @expected_captures = nil
        end
        # @api private
        # @return [String]
        def description
          if @expected_captures && @expected.match(actual)
            "match with string #{@expected} have captures #{surface_descriptions_in(@expected_captures).inspect}"
          else
            "match #{surface_descriptions_in(expected).inspect}"
          end
        end

        # @api private
        # @return [Boolean]
        def diffable?
          true
        end

        # Used to specify the captures we match against
        # @return [self]
        def with_captures(*captures)
          @expected_captures = captures
          self
        end

      private

        def captures_error
          ArgumentError.new("`with_captures` must be called with a regular expression, multiple strings, or a hash of named captures")
        end<commit_msg>failure message should read like the matcher<commit_after>module RSpec
  module Matchers
    module BuiltIn
      # @api private
      # Provides the implementation for `match`.
      # Not intended to be instantiated directly.
      class Match < BaseMatcher
        def initialize(expected)
          super(expected)

          @expected_captures = nil
        end
        # @api private
        # @return [String]
        def description
          if @expected_captures && @expected.match(actual)
            "match #{surface_descriptions_in(expected).inspect} with captures #{surface_descriptions_in(@expected_captures).inspect}"
          else
            "match #{surface_descriptions_in(expected).inspect}"
          end
        end

        # @api private
        # @return [Boolean]
        def diffable?
          true
        end

        # Used to specify the captures we match against
        # @return [self]
        def with_captures(*captures)
          @expected_captures = captures
          self
        end

      private

        def captures_error
          ArgumentError.new("`with_captures` must be called with a regular expression, multiple strings, or a hash of named captures")
        end
{'fraction_non_alphanumeric': 0.06635867282654347, 'fraction_numerical': 0.0, 'mean_word_length': 2.0, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5307853', 'n_tokens_mistral': 617, 'n_tokens_neox': 580, 'n_words': 189}