diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 457b23630a..bcdde66561 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -516,10 +516,10 @@ module Homebrew # Our gettext formula will be caught by check_linked_keg_only_brews gettext = begin - Formulary.factory("gettext") - rescue - nil - end + Formulary.factory("gettext") + rescue + nil + end homebrew_owned = @found.all? do |path| Pathname.new(path).realpath.to_s.start_with? "#{HOMEBREW_CELLAR}/gettext" end @@ -537,10 +537,10 @@ module Homebrew return if @found.empty? libiconv = begin - Formulary.factory("libiconv") - rescue - nil - end + Formulary.factory("libiconv") + rescue + nil + end if libiconv && libiconv.linked_keg.directory? unless libiconv.keg_only? <<-EOS.undent diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index d9c3e30b75..cabb22c228 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -269,10 +269,10 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy case entries.length when 0 then raise "Empty archive" when 1 then begin - Dir.chdir entries.first - rescue - nil - end + Dir.chdir entries.first + rescue + nil + end end end diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index adb4ebc324..91692c146a 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -56,10 +56,10 @@ require "compat" unless ARGV.include?("--no-compat") || ENV["HOMEBREW_NO_COMPAT" ORIGINAL_PATHS = ENV["PATH"].split(File::PATH_SEPARATOR).map do |p| begin - Pathname.new(p).expand_path - rescue - nil - end + Pathname.new(p).expand_path + rescue + nil + end end.compact.freeze # TODO: remove this as soon as it's removed from commands.rb. diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 11a19b4c3a..f935d9a13a 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -339,10 +339,10 @@ class BottleSpecification os_versions = collector.keys os_versions.map! do |osx| begin - MacOS::Version.from_symbol osx - rescue - nil - end + MacOS::Version.from_symbol osx + rescue + nil + end end.compact! os_versions.sort.reverse_each do |os_version| osx = os_version.to_sym