rubocop / rubocop-performance

An extension of RuboCop focused on code performance checks.
https://docs.rubocop.org/rubocop-performance
MIT License
682 stars 80 forks source link

Improve the `Performance/TimesMap` cop #422

Open ydakuka opened 10 months ago

ydakuka commented 10 months ago

Describe the solution you'd like

# bad
(0..8).map { |i| i }
0.upto(8).map { |i| i }

# good
Array.new(9) { |i| i }
ydakuka commented 10 months ago

https://github.com/fastruby/fast-ruby/pull/227