Skip to content

Commit

Permalink
(maint) Enable Performance/RedundantSortBy
Browse files Browse the repository at this point in the history
If elements are comparable, then calling `Enumerable#sort_by { |x| x }` is
redundant. Instead just call `Enumerable#sort`.
  • Loading branch information
joshcooper committed Oct 3, 2019
1 parent 2c3131e commit 56ae7c5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,6 @@ Style/TrailingUnderscoreVariable:
Lint/LiteralInInterpolation:
Enabled: false

Performance/RedundantSortBy:
Enabled: true

Performance/TimesMap:
Enabled: false

Expand Down

0 comments on commit 56ae7c5

Please sign in to comment.