mirror of
https://github.com/whippyshou/mastodon
synced 2024-11-24 15:16:26 +09:00
Apply Rubocop Performance/RedundantBlockCall (#23440)
This commit is contained in:
parent
f31d9a590d
commit
cec005068f
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user