aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-01 21:35:22 -0500
committerJack Nagel2014-04-01 21:35:22 -0500
commit8f1f1d8d8ad265715139957af2ae1f21ce74b550 (patch)
treeae2a57d53e8968a4b91f858f096d389c1fac0442 /Library
parent4830bdb5b7a99c5b29e85cef1751209f3010f482 (diff)
downloadbrew-8f1f1d8d8ad265715139957af2ae1f21ce74b550.tar.bz2
Make keg_only validation lazy
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_support.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb
index d70a0aa59..7efda3564 100644
--- a/Library/Homebrew/formula_support.rb
+++ b/Library/Homebrew/formula_support.rb
@@ -8,14 +8,15 @@ class KegOnlyReason
def initialize reason, explanation=nil
@reason = reason
@explanation = explanation
- @valid = case @reason
- when :provided_pre_mountain_lion then MacOS.version < :mountain_lion
- else true
- end
end
def valid?
- @valid
+ case @reason
+ when :provided_pre_mountain_lion
+ MacOS.version < :mountain_lion
+ else
+ true
+ end
end
def to_s