From d6023b86e5d22795e095f5a6f51195bb3d4e9c77 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Tue, 19 Jan 2016 01:48:49 -0800 Subject: [PATCH] Use yield instead of block.call --- lib/t/collectable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/t/collectable.rb b/lib/t/collectable.rb index 94a9ac09..9ae2959e 100644 --- a/lib/t/collectable.rb +++ b/lib/t/collectable.rb @@ -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