diff options
| author | Xu Cheng | 2015-02-24 15:54:31 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-02-24 17:04:29 +0800 |
| commit | 39473f769413c1239aeb99d6c7b5ce564461fb43 (patch) | |
| tree | efdea349cf84c9239ee28a7f3913f1754ec8ff66 /Library | |
| parent | 4c5a2eb77cadae9a4a4195e5311fa746c03ed51f (diff) | |
| download | brew-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')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 8 |
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 |
