audit: fix interpolation check

Fixes Homebrew/homebrew#19363.
This commit is contained in:
Jack Nagel 2013-04-26 19:18:12 -05:00
parent 7b7d4d2f1b
commit 62db042277

View File

@ -331,7 +331,7 @@ class FormulaAuditor
end
# Check for string interpolation of single values.
if text =~ /(system|inreplace|gsub!|change_make_var!) .* ['"]#\{(\w+(\.\w+)?)\}['"]/
if text =~ /(system|inreplace|gsub!|change_make_var!).*[ ,]"#\{([\w.]+)\}"/
problem "Don't need to interpolate \"#{$2}\" with #{$1}"
end