Apply Rubocop Performance/RedundantBlockCall (#23440)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user