From 9bd100bb529084bd45044c1a93c8e7fc4e054275 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Feb 2021 05:57:53 +0000 Subject: [PATCH 1/3] build(deps): bump warning from 1.1.0 to 1.2.0 in /Library/Homebrew Bumps [warning](https://github.com/jeremyevans/ruby-warning) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/jeremyevans/ruby-warning/releases) - [Changelog](https://github.com/jeremyevans/ruby-warning/blob/master/CHANGELOG) - [Commits](https://github.com/jeremyevans/ruby-warning/compare/1.1.0...1.2.0) Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index cca88cf182..be9bbff142 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -164,7 +164,7 @@ GEM unf_ext unf_ext (0.0.7.7) unicode-display_width (2.0.0) - warning (1.1.0) + warning (1.2.0) webrick (1.7.0) webrobots (0.1.2) zeitwerk (2.4.2) From 91923076ff5265f058607e68a6ae49cff13ac8b4 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Wed, 17 Feb 2021 05:59:58 +0000 Subject: [PATCH 2/3] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../lib/warning.rb | 103 ++++++++++-------- 2 files changed, 57 insertions(+), 48 deletions(-) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{warning-1.1.0 => warning-1.2.0}/lib/warning.rb (83%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 9f966079b3..4aa17dab91 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -91,4 +91,4 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-stub-0 $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-1.1.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/spoom-1.0.9/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tapioca-0.4.14/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/warning-1.1.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/warning-1.2.0/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/warning-1.1.0/lib/warning.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/warning-1.2.0/lib/warning.rb similarity index 83% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/warning-1.1.0/lib/warning.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/warning-1.2.0/lib/warning.rb index 52177b3c5d..7fac4f5fcf 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/warning-1.1.0/lib/warning.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/warning-1.2.0/lib/warning.rb @@ -4,7 +4,7 @@ module Warning module Processor # Map of symbols to regexps for warning messages to ignore. IGNORE_MAP = { - ambiguous_slash: /: warning: ambiguous first argument; put parentheses or a space even after `\/' operator\n\z/, + ambiguous_slash: /: warning: ambiguous first argument; put parentheses or a space even after `\/' operator\n\z|: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `\/' operator\n\z/, arg_prefix: /: warning: `[&\*]' interpreted as argument prefix\n\z/, bignum: /: warning: constant ::Bignum is deprecated\n\z/, fixnum: /: warning: constant ::Fixnum is deprecated\n\z/, @@ -17,8 +17,9 @@ module Warning useless_operator: /: warning: possibly useless use of [> when the # result is not used. + # :void_context :: Ignore warnings for :: to reference constants when the result is not + # used (often used to trigger autoload). # # Examples: # @@ -126,7 +129,7 @@ module Warning # Instead of passing a block, you can pass a hash of actions to take for specific # warnings, using regexp as keys and a callable objects as values: # - # Warning.ignore(__FILE__, + # Warning.process(__FILE__, # /instance variable @\w+ not initialized/ => proc do |warning| # LOGGER.warning(warning) # end, @@ -166,57 +169,63 @@ module Warning nil end - # Handle ignored warnings and warning processors. If the warning is - # not ignored, is not a duplicate warning (if checking for duplicates) - # and there is no warning processor setup for the warning - # string, then use the default behavior of writing to $stderr. - def warn(str) - synchronize{@ignore.dup}.each do |path, regexp| - if str.start_with?(path) && str =~ regexp - return - end - end - if @dedup - if synchronize{@dedup[str]} - return - end + if RUBY_VERSION >= '3.0' + method_args = ', category: nil' + super_ = "category ? super : super(str)" + else + super_ = "super" + end - synchronize{@dedup[str] = true} - end - - action = catch(:action) do - synchronize{@process.dup}.each do |path, block| - if str.start_with?(path) - if block.is_a?(Hash) - block.each do |regexp, blk| - if str =~ regexp - throw :action, blk.call(str) - end - end - else - throw :action, block.call(str) - end + class_eval(<<-END, __FILE__, __LINE__+1) + def warn(str#{method_args}) + synchronize{@ignore.dup}.each do |path, regexp| + if str.start_with?(path) && str =~ regexp + return end end - :default - end + if @dedup + if synchronize{@dedup[str]} + return + end - case action - when :default - super - when :backtrace - super - $stderr.puts caller - when :raise - raise str - else - # nothing - end + synchronize{@dedup[str] = true} + end - nil - end + action = catch(:action) do + synchronize{@process.dup}.each do |path, block| + if str.start_with?(path) + if block.is_a?(Hash) + block.each do |regexp, blk| + if str =~ regexp + throw :action, blk.call(str) + end + end + else + throw :action, block.call(str) + end + end + end + + :default + end + + case action + when :default + #{super_} + when :backtrace + #{super_} + $stderr.puts caller + when :raise + raise str + else + # nothing + end + + nil + end + END private From 5a4ec39dbaa0bdc3a9f1f0cd489f781b8e1da461 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Wed, 17 Feb 2021 06:00:47 +0000 Subject: [PATCH 3/3] Update RBI files for warning. --- .../sorbet/rbi/gems/{warning@1.1.0.rbi => warning@1.2.0.rbi} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{warning@1.1.0.rbi => warning@1.2.0.rbi} (100%) diff --git a/Library/Homebrew/sorbet/rbi/gems/warning@1.1.0.rbi b/Library/Homebrew/sorbet/rbi/gems/warning@1.2.0.rbi similarity index 100% rename from Library/Homebrew/sorbet/rbi/gems/warning@1.1.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/warning@1.2.0.rbi