aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-03 10:47:47 -0500
committerJack Nagel2014-08-03 10:47:47 -0500
commit94184b00bf7ac5e386513430e450e15393d584d6 (patch)
treec7d15b9c74e174312acefea6b77704ffddfb7563 /Library/Homebrew/formula.rb
parent8a049505cef82da2209c38943bb687ebea18bb9a (diff)
downloadhomebrew-94184b00bf7ac5e386513430e450e15393d584d6.tar.bz2
Move compiler failure matching logic into failure object
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 4c99de692..ab5b00fa2 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -231,13 +231,8 @@ class Formula
self.class.keg_only_reason
end
- def fails_with? cc
- (self.class.cc_failures || []).any? do |failure|
- # Major version check distinguishes between, e.g.,
- # GCC 4.7.1 and GCC 4.8.2, where a comparison is meaningless
- failure.name == cc.name && failure.major_version == cc.major_version &&
- failure.version >= (cc.version || 0)
- end
+ def fails_with? compiler
+ (self.class.cc_failures || []).any? { |failure| failure === compiler }
end
# sometimes the formula cleaner breaks things