lib/rubocop/cop/performance/delete_suffix.rb in rubocop-performance-1.13.3 vs lib/rubocop/cop/performance/delete_suffix.rb in rubocop-performance-1.14.0
- old
+ new
@@ -47,9 +47,12 @@
# str.sub!(/suffix$/, '')
#
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
PREFERRED_METHODS = {