lib/rubocop/cop/performance/start_with.rb in rubocop-performance-0.0.0 vs lib/rubocop/cop/performance/start_with.rb in rubocop-performance-0.0.1

- old
+ new

@@ -24,10 +24,10 @@ (send (regexp (str $#literal_at_start?) (regopt)) {:match :=~} $_)} PATTERN def literal_at_start?(regex_str) # is this regexp 'literal' in the sense of only matching literal - # chars, rather than using metachars like . and * and so on? + # chars, rather than using metachars like `.` and `*` and so on? # also, is it anchored at the start of the string? # (tricky: \s, \d, and so on are metacharacters, but other characters # escaped with a slash are just literals. LITERAL_REGEX takes all # that into account.) regex_str =~ /\A\\A(?:#{LITERAL_REGEX})+\z/