<commit_before>class Series
  def initialize(digits)
    @digits = digits.chars.map(&:to_i)
  end

  def slices(num)
    raise ArgumentError if num > digits.size
    digits[0..-num].each_index.map { |index| digits.slice(index, num) }
  end

  private
  attr_reader :digits
end<commit_msg>Series, method [ ] and each_index replaced by upto<commit_after>class Series
  def initialize(digits)
    @digits = digits.chars.map(&:to_i)
  end

  def slices(num)
    raise ArgumentError if num > digits.size
    0.upto(digits.size - num).map { |index| digits.slice(index, num) }
  end

  private
  attr_reader :digits
end


{'fraction_non_alphanumeric': 0.11074918566775244, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 3.58955223880597, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1420124', 'n_tokens_mistral': 227, 'n_tokens_neox': 213, 'n_words': 52}