aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorXu Cheng2015-02-24 15:54:31 +0800
committerXu Cheng2015-02-24 17:04:29 +0800
commit39473f769413c1239aeb99d6c7b5ce564461fb43 (patch)
treeefdea349cf84c9239ee28a7f3913f1754ec8ff66 /Library/Homebrew
parent4c5a2eb77cadae9a4a4195e5311fa746c03ed51f (diff)
downloadbrew-39473f769413c1239aeb99d6c7b5ce564461fb43.tar.bz2
audit: fix FormulaText match
It's used in `audit_text` Closes Homebrew/homebrew#37139. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/audit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 2ab655df4..a568be6b7 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -69,6 +69,14 @@ class FormulaText
def has_trailing_newline?
/\Z\n/ =~ @text
end
+
+ def =~ regex
+ regex =~ @text
+ end
+
+ def !~ regex
+ regex !~ @text
+ end
end
class FormulaAuditor