lib/rubocop/cop/lint/percent_string_array.rb in rbhint-0.85.1.rc1 vs lib/rubocop/cop/lint/percent_string_array.rb in rbhint-0.85.1.rc2
- old
+ new
@@ -60,10 +60,10 @@
literal = value.children.first.to_s.scrub
# To avoid likely false positives (e.g. a single ' or ")
next if literal.gsub(/[^[[:alnum:]]]/, '').empty?
- QUOTES_AND_COMMAS.any? { |pat| literal =~ pat }
+ QUOTES_AND_COMMAS.any? { |pat| literal.match?(pat) }
end
end
end
end
end