Hacker News new | ask | show | jobs
by ThinkWriteMute 5959 days ago
I just found this: http://www.census.gov/tiger/tms/gazetteer/zips.txt

So here's my solution:

  def state?(zip)
    zip_code_list = File.open('zips.txt')
    suggested_list = zip_code_list.grep(/(.*"#{zip}\d+".*)/)
  end