diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index dc9b680f2e..321599f06c 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -693,8 +693,8 @@ class Formula @skip_clean_paths ||= Set.new end - def keg_only reason, explanation=nil - @keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp) + def keg_only reason, explanation="" + @keg_only_reason = KegOnlyReason.new(reason, explanation) end # Flag for marking whether this formula needs C++ standard library diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index f3587e9a80..aa31742190 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -4,9 +4,7 @@ FormulaConflict = Struct.new(:name, :reason) # Used to annotate formulae that duplicate OS X provided software # or cause conflicts when linked in. class KegOnlyReason - attr_reader :reason, :explanation - - def initialize reason, explanation=nil + def initialize(reason, explanation) @reason = reason @explanation = explanation end @@ -38,9 +36,9 @@ class KegOnlyReason #{@explanation} EOS when :provided_until_xcode43 - "Xcode provides this software prior to version 4.3.\n\n#{explanation}" + "Xcode provides this software prior to version 4.3.\n\n#{@explanation}" when :provided_until_xcode5 - "Xcode provides this software prior to version 5.\n\n#{explanation}" + "Xcode provides this software prior to version 5.\n\n#{@explanation}" else @reason end.strip