Skip to content

Commit

Permalink
Use collect instead of each to map elements into an array
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Apr 30, 2024
1 parent a669288 commit 44b3d71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/t/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,8 @@ def reach(tweet_id)
require "t/core_ext/string"
require "set"
status_thread = Thread.new { client.status(tweet_id.to_i, include_my_retweet: false) }
threads = []
client.retweeters_ids(tweet_id.to_i).each do |retweeter_id|
threads << Thread.new(retweeter_id) do |user_id|
threads = client.retweeters_ids(tweet_id.to_i).collect do |retweeter_id|
Thread.new(retweeter_id) do |user_id|
client.follower_ids(user_id).to_a
end
end
Expand Down

0 comments on commit 44b3d71

Please sign in to comment.