audit: fix FormulaText match

It's used in `audit_text`

Closes Homebrew/homebrew#37139.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-02-24 15:54:31 +08:00
parent 4c5a2eb77c
commit 39473f7694

View File

@ -69,6 +69,14 @@ class FormulaText
def has_trailing_newline? def has_trailing_newline?
/\Z\n/ =~ @text /\Z\n/ =~ @text
end end
def =~ regex
regex =~ @text
end
def !~ regex
regex !~ @text
end
end end
class FormulaAuditor class FormulaAuditor