<commit_before>require_relative "../bundle/bundler/setup" # configures load paths
require 'rspec/core'

class << RSpec
  attr_writer :world
end

# Here we are restoring the old implementation of `configure_group`, so that
# we can toggle the new vs old implementation in the benchmark by aliasing it.
module RSpecConfigurationOverrides
  def initialize(*args)
    super
    @include_extend_or_prepend_modules = []
  end

  def include(mod, *filters)
    meta = RSpec::Core::Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
    @include_extend_or_prepend_modules << [:include, mod, meta]
    super
  end

  def old_configure_group(group)
    @include_extend_or_prepend_modules.each do |include_extend_or_prepend, mod, filters|
      next unless filters.empty? || group.apply?(:any?, filters)<commit_msg>Keep benchmark working.<commit_after>require_relative "../bundle/bundler/setup" # configures load paths
require 'rspec/core'

class << RSpec
  attr_writer :world
end

# Here we are restoring the old implementation of `configure_group`, so that
# we can toggle the new vs old implementation in the benchmark by aliasing it.
module RSpecConfigurationOverrides
  def initialize(*args)
    super
    @include_extend_or_prepend_modules = []
  end

  def include(mod, *filters)
    meta = RSpec::Core::Metadata.build_hash_from(filters, :warn_about_example_group_filtering)
    @include_extend_or_prepend_modules << [:include, mod, meta]
    super
  end

  def old_configure_group(group)
    @include_extend_or_prepend_modules.each do |include_extend_or_prepend, mod, filters|
      next unless filters.empty? || RSpec::Core::MetadataFilter.apply?(:any?, filters, group.metadata)
{'fraction_non_alphanumeric': 0.08785377358490566, 'fraction_numerical': 0.0, 'mean_word_length': 5.238970588235294, 'pattern_counts': {'":': 0, '<': 11, '<?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': '355019', 'n_tokens_mistral': 514, 'n_tokens_neox': 505, 'n_words': 138}