diff --git a/.gitignore b/.gitignore index 773337130a..165b20da79 100644 --- a/.gitignore +++ b/.gitignore @@ -80,7 +80,6 @@ !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/string/inflections.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/string/multibyte.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/enumerable.rb -!**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/core_ext/kernel/reporting.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/i18n.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/inflector/transliterate.rb !**/vendor/bundle/ruby/*/gems/activesupport-*/lib/active_support/inflector/methods.rb diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 4b4a9641a1..b59bcdc6ca 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -18,7 +18,6 @@ require "active_support/core_ext/file/atomic" require "active_support/core_ext/hash/deep_merge" require "active_support/core_ext/hash/except" require "active_support/core_ext/hash/keys" -require "active_support/core_ext/kernel/reporting" require "active_support/core_ext/object/blank" require "active_support/core_ext/object/try" require "active_support/core_ext/string/exclude" diff --git a/Library/Homebrew/utils/autoremove.rb b/Library/Homebrew/utils/autoremove.rb index 3a53c5d745..bce407f306 100644 --- a/Library/Homebrew/utils/autoremove.rb +++ b/Library/Homebrew/utils/autoremove.rb @@ -33,7 +33,9 @@ module Utils next if Tab.for_keg(formula.any_installed_keg).poured_from_bottle formula.deps.select(&:build?).each do |dep| - Kernel.suppress(FormulaUnavailableError) { dependents << dep.to_formula } + dependents << dep.to_formula + rescue FormulaUnavailableError + # do nothing end end formulae - dependents diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.3/lib/active_support/core_ext/kernel/reporting.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.3/lib/active_support/core_ext/kernel/reporting.rb deleted file mode 100644 index 9155bd6c10..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.3/lib/active_support/core_ext/kernel/reporting.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -module Kernel - module_function - - # Sets $VERBOSE to +nil+ for the duration of the block and back to its original - # value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - def silence_warnings - with_warnings(nil) { yield } - end - - # Sets $VERBOSE to +true+ for the duration of the block and back to its - # original value afterwards. - def enable_warnings - with_warnings(true) { yield } - end - - # Sets $VERBOSE for the duration of the block and back to its original - # value afterwards. - def with_warnings(flag) - old_verbose, $VERBOSE = $VERBOSE, flag - yield - ensure - $VERBOSE = old_verbose - end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts 'This code is NOT reached' - # end - # - # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' - def suppress(*exception_classes) - yield - rescue *exception_classes - end -end