<commit_before>class Path
  #
  # Path#find is an iterator to traverse a directory tree in a depth first
  # manner.  It yields a Path for each file under "this" directory.
  #
  # Since it is implemented by <tt>find.rb</tt>, <tt>Find.prune</tt> can be used
  # to control the traversal.
  #
  # If +self+ is <tt>.</tt>, yielded pathnames begin with a filename in the
  # current directory, not <tt>./</tt>.
  #
  def find # :yield: pathname
    return to_enum(__method__) unless block_given?
    require 'find'
    if @path == '.'
      Find.find(@path) { |f| yield Path.new(f.sub(%r{\A\./}, '')) }
    else
      Find.find(@path) { |f| yield Path.new(f) }
    end
  end
end<commit_msg>sync upstream Pathname changes until r34246<commit_after>class Path
  #
  # Path#find is an iterator to traverse a directory tree in a depth first
  # manner.  It yields a Path for each file under "this" directory.
  #
  # Returns an enumerator if no block is given.
  #
  # Since it is implemented by <tt>find.rb</tt>, <tt>Find.prune</tt> can be used
  # to control the traversal.
  #
  # If +self+ is <tt>.</tt>, yielded pathnames begin with a filename in the
  # current directory, not <tt>./</tt>.
  #
  def find # :yield: pathname
    return to_enum(__method__) unless block_given?
    require 'find'
    if @path == '.'
      Find.find(@path) { |f| yield Path.new(f.sub(%r{\A\./}, '')) }
    else
      Find.find(@path) { |f| yield Path.new(f) }
    end
  end
end
{'fraction_non_alphanumeric': 0.13804945054945056, 'fraction_numerical': 0.003434065934065934, 'mean_word_length': 2.8853333333333335, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '1500262', 'n_tokens_mistral': 505, 'n_tokens_neox': 492, 'n_words': 172}