Remove another unnecessary default argument

This commit is contained in:
Jack Nagel 2014-08-08 01:34:45 -05:00
parent 472a2cec1e
commit af804f7475
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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