Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle null result sets more gracefully

  • Loading branch information...
commit f6d1f995dc7757dda4f4ac71dda2487d56d51c85 1 parent ef91557
@sferik authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/twitter/search.rb
View
4 lib/twitter/search.rb
@@ -131,7 +131,9 @@ def fetch(force=false)
end
def each
- fetch()["results"].each{|r| yield r}
+ results = fetch()['results']
+ return if results.nil?
+ results.each {|r| yield r}
end
def next_page?
Please sign in to comment.
Something went wrong with that request. Please try again.