diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 265abbec9e..2c6ce7c4aa 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 bd341c365e..8f4f1b799e 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