lib/rubocop/cop/performance/start_with.rb in rubocop-performance-1.2.0 vs lib/rubocop/cop/performance/start_with.rb in rubocop-performance-1.3.0

- old
+ new

@@ -14,11 +14,11 @@ # # # good # 'abc'.start_with?('ab') class StartWith < Cop MSG = 'Use `String#start_with?` instead of a regex match anchored to ' \ - 'the beginning of the string.'.freeze - SINGLE_QUOTE = "'".freeze + 'the beginning of the string.' + SINGLE_QUOTE = "'" def_node_matcher :redundant_regex?, <<-PATTERN {(send $!nil? {:match :=~ :match?} (regexp (str $#literal_at_start?) (regopt))) (send (regexp (str $#literal_at_start?) (regopt)) {:match :=~} $_)} PATTERN