From a3863394c0cbf38255d9b71cb589710729bbbcc6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 22 Jul 2013 22:53:43 -0500 Subject: [PATCH] audit: escape dep before regexp interpolation --- Library/Homebrew/cmd/audit.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 3d23212567..a49d01e06c 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -511,6 +511,7 @@ class FormulaAuditor end def audit_conditional_dep(dep, condition, line) + dep = Regexp.escape(dep) case condition when /if build\.include\? ['"]with-#{dep}['"]$/, /if build\.with\? ['"]#{dep}['"]$/ problem %{Replace #{line.inspect} with "depends_on #{quote_dep(dep)} => :optional"}