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 @skip_clean_paths ||= Set.new
end end
def keg_only reason, explanation=nil def keg_only reason, explanation=""
@keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp) @keg_only_reason = KegOnlyReason.new(reason, explanation)
end end
# Flag for marking whether this formula needs C++ standard library # 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 # Used to annotate formulae that duplicate OS X provided software
# or cause conflicts when linked in. # or cause conflicts when linked in.
class KegOnlyReason class KegOnlyReason
attr_reader :reason, :explanation def initialize(reason, explanation)
def initialize reason, explanation=nil
@reason = reason @reason = reason
@explanation = explanation @explanation = explanation
end end
@ -38,9 +36,9 @@ class KegOnlyReason
#{@explanation} #{@explanation}
EOS EOS
when :provided_until_xcode43 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 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 else
@reason @reason
end.strip end.strip