aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-08-08 01:34:45 -0500
committerJack Nagel2014-08-08 01:34:45 -0500
commit7676600dfe80a4f3c09edcedef109168cdc3178b (patch)
tree42fffa1c9cf9e31e036df59c8a84d5e0ad8dd5ba /Library
parent2f75d69880cce03bd19e9a0106aa8f0e88788ea8 (diff)
downloadhomebrew-7676600dfe80a4f3c09edcedef109168cdc3178b.tar.bz2
Remove another unnecessary default argument
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
-rw-r--r--Library/Homebrew/formula_support.rb8
2 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index dc9b680f2..321599f06 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 f3587e9a8..aa3174219 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