<commit_before>require 'net/http'
require 'active_support/json'

module Geocoder
  module Lookup
    class Base

      ##
      # Takes a search string (eg: "Mississippi Coast Coliseumf, Biloxi, MS")
      # for geocoding, or coordinates (latitude, longitude) for reverse
      # geocoding. Returns an array of Geocoder::Result objects,
      # or nil if not found or if network error.
      #
      def search(*args)
        return [] if args[0].blank?
        if res = results(args.join(","), args.size == 2)
          res.map{ |r| result_class.new(r) }
        end
      end


      private # -------------------------------------------------------------

      ##<commit_msg>Don't use ActiveSupport's .blank? method.<commit_after>require 'net/http'
require 'active_support/json'

module Geocoder
  module Lookup
    class Base

      ##
      # Takes a search string (eg: "Mississippi Coast Coliseumf, Biloxi, MS")
      # for geocoding, or coordinates (latitude, longitude) for reverse
      # geocoding. Returns an array of Geocoder::Result objects,
      # or nil if not found or if network error.
      #
      def search(*args)
        return [] if args[0].nil? || args[0] == ""
        if res = results(args.join(","), args.size == 2)
          res.map{ |r| result_class.new(r) }
        end
      end


      private # -------------------------------------------------------------

      ##
{'fraction_non_alphanumeric': 0.1891506067094932, 'fraction_numerical': 0.0035688793718772305, 'mean_word_length': 1.7762376237623763, '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': '4412616', 'n_tokens_mistral': 407, 'n_tokens_neox': 392, 'n_words': 125}