Skip to content

Commit

Permalink
Remove redundant TargetRubyVersion
Browse files Browse the repository at this point in the history
Follow up to #232.

This commit removes redundant `TargetRubyVersion` because
RuboCop Performance already drops Ruby 2.4 or lower.
  • Loading branch information
koic committed Aug 26, 2021
1 parent ad2b896 commit e3c374b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions docs/modules/ROOT/pages/cops_performance.adoc
Expand Up @@ -542,8 +542,6 @@ Model.select(:value).count

== Performance/DeletePrefix

NOTE: Required Ruby version: 2.5

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

Expand Down Expand Up @@ -616,8 +614,6 @@ str.sub!(/^prefix/, '')

== Performance/DeleteSuffix

NOTE: Required Ruby version: 2.5

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

Expand Down Expand Up @@ -1238,8 +1234,6 @@ end

== Performance/RedundantEqualityComparisonBlock

NOTE: Required Ruby version: 2.5

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

Expand Down
3 changes: 0 additions & 3 deletions lib/rubocop/cop/performance/delete_prefix.rb
Expand Up @@ -47,9 +47,6 @@ module Performance
class DeletePrefix < Base
include RegexpMetacharacter
extend AutoCorrector
extend TargetRubyVersion

minimum_target_ruby_version 2.5

MSG = 'Use `%<prefer>s` instead of `%<current>s`.'
RESTRICT_ON_SEND = %i[gsub gsub! sub sub!].freeze
Expand Down
3 changes: 0 additions & 3 deletions lib/rubocop/cop/performance/delete_suffix.rb
Expand Up @@ -47,9 +47,6 @@ module Performance
class DeleteSuffix < Base
include RegexpMetacharacter
extend AutoCorrector
extend TargetRubyVersion

minimum_target_ruby_version 2.5

MSG = 'Use `%<prefer>s` instead of `%<current>s`.'
RESTRICT_ON_SEND = %i[gsub gsub! sub sub!].freeze
Expand Down
Expand Up @@ -24,9 +24,6 @@ module Performance
#
class RedundantEqualityComparisonBlock < Base
extend AutoCorrector
extend TargetRubyVersion

minimum_target_ruby_version 2.5

MSG = 'Use `%<prefer>s` instead of block.'

Expand Down

0 comments on commit e3c374b

Please sign in to comment.