<commit_before>module RackRequestIPStrategies
  class Base
    def self.call(env, config = Config.default)
      new(env, config).call
    end

    def initialize(env, config)
      @env = env
      @config = config
    end

    private

    def ips_from(header)
      ips = @env[header] ? @env[header].strip.split(/[,\s]+/) : []
      ips.select { |ip| valid_ip?(ip) }
    end

    def valid_ip?(ip)
      return false if ip.include?('/')
      IPAddr.new(ip)
    rescue ArgumentError, IPAddr::InvalidAddressError
      nil
    end
  end
end
<commit_msg>Use false to be consistent with the early return<commit_after>module RackRequestIPStrategies
  class Base
    def self.call(env, config = Config.default)
      new(env, config).call
    end

    def initialize(env, config)
      @env = env
      @config = config
    end

    private

    def ips_from(header)
      ips = @env[header] ? @env[header].strip.split(/[,\s]+/) : []
      ips.select { |ip| valid_ip?(ip) }
    end

    def valid_ip?(ip)
      return false if ip.include?('/')
      IPAddr.new(ip)
    rescue ArgumentError, IPAddr::InvalidAddressError
      false
    end
  end
end

{'fraction_non_alphanumeric': 0.11857018308631212, 'fraction_numerical': 0.0, 'mean_word_length': 2.4893617021276597, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4213738', 'n_tokens_mistral': 381, 'n_tokens_neox': 376, 'n_words': 94}