Skip to content

Commit

Permalink
Remove Performance/UnfreezeString cop
Browse files Browse the repository at this point in the history
This PR removes `Performance/UnfreezeString` cop.

Starting with Ruby 3.3, the aim of this cop to improve performance by replacing `String#dup` with `String#+@` no longer holds meaning.
rubocop/rubocop-performance#384

Currently, Rails 8.0 (rc2) supports Ruby 3.2 and above, but support for Ruby 3.2 will likely be dropped in a future version of Rails.
When that time comes, any use of `String#+@` instead of `String#dup` at the application layer will be unnecessary.

Since this is enforced for performance rather than style, I think it makes sense to disable this cop.

This is a suggestion to disable a cop that will eventually become irrelevant, from the perspective of maintaining RuboCop Performance.
I understand that rubocop-rails-omakase does not expect configuration changes, so please feel free to close this if it doesn’t fit.
  • Loading branch information
koic committed Nov 3, 2024
1 parent 63a7608 commit 1c00ce4
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 @@ -160,9 +160,6 @@ Performance:
Performance/FlatMap:
Enabled: true

Performance/UnfreezeString:
Enabled: true

# Prefer assert_not over assert !
Rails/AssertNot:
Include:
Expand Down

0 comments on commit 1c00ce4

Please sign in to comment.