aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-07-18 03:27:42 -0500
committerJack Nagel2012-08-07 15:33:29 -0500
commite3e8d7072c4c0eaed7b5bed59c4f675e82863b1f (patch)
treeabe5d1c45e75572659e61b502f89df61789668e7 /Library
parent979fdb57f0b3405369b9b783ba816dad048bc25e (diff)
downloadhomebrew-e3e8d7072c4c0eaed7b5bed59c4f675e82863b1f.tar.bz2
Simplify conditional
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/info.rb3
-rw-r--r--Library/Homebrew/formula_installer.rb3
2 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 265abbec9..2c6ce7c4a 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -96,8 +96,7 @@ module Homebrew extend self
Homebrew.dump_options_for_formula f
end
- the_caveats = (f.caveats || "").strip
- unless the_caveats.empty?
+ unless f.caveats.to_s.strip.empty?
ohai "Caveats"
puts f.caveats
end
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index bd341c365..8f4f1b799 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -141,8 +141,7 @@ class FormulaInstaller
end
def caveats
- the_caveats = (f.caveats || "").strip
- unless the_caveats.empty?
+ unless f.caveats.to_s.strip.empty?
ohai "Caveats", f.caveats
@show_summary_heading = true
end