Apply Rubocop Performance/RedundantBlockCall (#23440)

lolsob-rspec
Nick Schonning 2023-02-07 18:58:18 -05:00 committed by GitHub
parent fd875e173b
commit 0ea80860f4
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class Trends::History
def each(&block)
if block_given?
(0...7).map { |i| block.call(get(i.days.ago)) }
(0...7).map { |i| yield(get(i.days.ago)) }
else
to_enum(:each)
end

View File

@ -49,7 +49,7 @@ class Import::RelationshipWorker
.with_error_handler { |error, handle| error.is_a?(HTTP::Error) || error.is_a?(OpenSSL::SSL::SSLError) ? handle.call(error) : raise(error) }
.run
else
block.call
yield
end
end
end