class Geocoder::Lookup::Maxmind

def results(query)

def results(query)
  # don't look up a loopback address, just return the stored result
  return [reserved_result] if query.loopback_ip_address?
  doc = fetch_data(query)
  if doc and doc.is_a?(Array)
    if !data_contains_error?(doc)
      return [doc]
    elsif doc.last == "INVALID_LICENSE_KEY"
      raise_error(Geocoder::InvalidApiKey) || warn("Invalid MaxMind API key.")
    end
  end
  return []
end