From 39473f769413c1239aeb99d6c7b5ce564461fb43 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Tue, 24 Feb 2015 15:54:31 +0800 Subject: [PATCH] audit: fix FormulaText match It's used in `audit_text` Closes Homebrew/homebrew#37139. Signed-off-by: Xu Cheng --- Library/Homebrew/cmd/audit.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 2ab655df4d..a568be6b72 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