From 8f1f1d8d8ad265715139957af2ae1f21ce74b550 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 1 Apr 2014 21:35:22 -0500 Subject: [PATCH] Make keg_only validation lazy --- Library/Homebrew/formula_support.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index d70a0aa599..7efda3564d 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