<commit_before>module Polyfill
  module V2_4
    module Integer
      module Digits
        refine ::Integer do
          def digits(base = 10)
            raise Math::DomainError, 'out of domain' if self < 0
            raise ArgumentError, 'negative radix' if base < 0
            raise ArgumentError, "invalid radix #{base}" if base == 0 || base == 1

            acc = []
            remainder = self
            while remainder > 0
              remainder, value = remainder.divmod(base)
              acc.push(value)
            end
            acc
          end if RUBY_VERSION < '2.4.0'

          def respond_to?(method, *)
            return true if method.to_sym == :digits

            super
          end if RUBY_VERSION < '2.4.0'
        end
      end
    end
  end
end<commit_msg>only need to check that it is less than 2<commit_after>module Polyfill
  module V2_4
    module Integer
      module Digits
        refine ::Integer do
          def digits(base = 10)
            raise Math::DomainError, 'out of domain' if self < 0
            raise ArgumentError, 'negative radix' if base < 0
            raise ArgumentError, "invalid radix #{base}" if base < 2

            acc = []
            remainder = self
            while remainder > 0
              remainder, value = remainder.divmod(base)
              acc.push(value)
            end
            acc
          end if RUBY_VERSION < '2.4.0'

          def respond_to?(method, *)
            return true if method.to_sym == :digits

            super
          end if RUBY_VERSION < '2.4.0'
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07418952618453865, 'fraction_numerical': 0.018703241895261846, 'mean_word_length': 1.4541284403669725, 'pattern_counts': {'":': 0, '<': 12, '<?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': '6701152', 'n_tokens_mistral': 456, 'n_tokens_neox': 439, 'n_words': 150}