<commit_before>DuckPuncher.logger = Logger.new(STDOUT).tap do |config|
  config.formatter = proc { |*args| "[DuckPuncher] #{args[0]}: #{args[-1]}\n" }
  config.level = Logger::ERROR
end

ducks = [
  [String, DuckPuncher::Ducks::String],
  [Enumerable, DuckPuncher::Ducks::Enumerable, {
    # Re-include Enumerable in these classes to pick up the new extensions
    after: proc {
      [Array, Set, Range, Enumerator].each do |k|
        DuckPuncher.logger.debug("Sending include to #{k} with Enumerable") and k.send(:include, Enumerable)
      end
    }
  }],
  [Numeric, DuckPuncher::Ducks::Numeric],
  [Hash, DuckPuncher::Ducks::Hash],
  [Object, DuckPuncher::Ducks::Object],
  [Module, DuckPuncher::Ducks::Module],
  [Method, DuckPuncher::Ducks::Method, { before: ->(_target) { DuckPuncher::GemInstaller.initialize! } }],
]
ducks << ['ActiveRecord::Base', DuckPuncher::Ducks::ActiveRecord] if defined? ::ActiveRecord
ducks.each do |duck|
  DuckPuncher.register *duck
end<commit_msg>Update defaults to only include Enum if it's a target<commit_after>DuckPuncher.logger = Logger.new(STDOUT).tap do |config|
  config.formatter = proc { |*args| "[DuckPuncher] #{args[0]}: #{args[-1]}\n" }
  config.level = Logger::ERROR
end

ducks = [
  [String, DuckPuncher::Ducks::String],
  [Enumerable, DuckPuncher::Ducks::Enumerable, {
    after: proc { |target|
      # Re-include Enumerable in these classes to pick up the new extensions
      hosts = [Array, Set, Range, Enumerator]
      hosts = [target] if hosts.include?(target)
      hosts.each do |k|
        DuckPuncher.logger.debug("Sending include to #{k} with Enumerable") and k.send(:include, Enumerable)
      end
    }
  }],
  [Numeric, DuckPuncher::Ducks::Numeric],
  [Hash, DuckPuncher::Ducks::Hash],
  [Object, DuckPuncher::Ducks::Object],
  [Module, DuckPuncher::Ducks::Module],
  [Method, DuckPuncher::Ducks::Method, { before: ->(_target) { DuckPuncher::GemInstaller.initialize! } }],
]
ducks << ['ActiveRecord::Base', DuckPuncher::Ducks::ActiveRecord] if defined? ::ActiveRecord
ducks.each do |duck|
  DuckPuncher.register *duck
end
{'fraction_non_alphanumeric': 0.16124401913875597, 'fraction_numerical': 0.0019138755980861245, 'mean_word_length': 4.906779661016949, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5258905', 'n_tokens_mistral': 759, 'n_tokens_neox': 700, 'n_words': 159}