Skip to content

Commit

Permalink
Use yield instead of block.call
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jan 19, 2016
1 parent 239bbcb commit d6023b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/t/collectable.rb
Expand Up @@ -32,7 +32,7 @@ def collect_with_count(count)

def collect_with_page(collection = ::Set.new, page = 1, previous = nil, &block)
tweets = Retryable.retryable(tries: 3, on: Twitter::Error, sleep: 0) do
block.call(page)
yield page
end
return collection if tweets.nil? || tweets == previous || page >= MAX_PAGE
collection += tweets
Expand Down

0 comments on commit d6023b8

Please sign in to comment.