Skip to content

Commit 8e87a52

Browse files
authored
Remove Performance/UnfreezeString cop (#22)
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 - rubocop/rubocop-performance#418 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.
1 parent 63a7608 commit 8e87a52

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

rubocop.yml

-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ Performance:
160160
Performance/FlatMap:
161161
Enabled: true
162162

163-
Performance/UnfreezeString:
164-
Enabled: true
165-
166163
# Prefer assert_not over assert !
167164
Rails/AssertNot:
168165
Include:

0 commit comments

Comments
 (0)