Skip to content

Commit 637fd5b

Browse files
authored
Merge pull request #19114 from Homebrew/dependabot/bundler/Library/Homebrew/concurrent-ruby-1.3.5
build(deps): bump concurrent-ruby from 1.3.4 to 1.3.5 in /Library/Homebrew
2 parents 0645117 + 1132d0e commit 637fd5b

File tree

122 files changed

+78
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+78
-61
lines changed

Library/Homebrew/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ GEM
99
bigdecimal (3.1.9)
1010
bindata (2.5.0)
1111
coderay (1.1.3)
12-
concurrent-ruby (1.3.4)
12+
concurrent-ruby (1.3.5)
1313
diff-lcs (1.5.1)
1414
docile (1.4.1)
1515
elftools (1.3.1)
Lines changed: 44 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Library/Homebrew/vendor/bundle/bundler/setup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def self.extension_api_version
4343
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.9/lib")
4444
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.0/lib")
4545
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
46-
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby")
46+
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby")
4747
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib")
4848
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.1/lib")
4949
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.1/lib")
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def await_for(timeout)
371371
# @param [Float] timeout the maximum number of seconds to wait
372372
# @return [Boolean] true if all actions complete before timeout
373373
#
374-
# @raise [Concurrent::TimeoutError] when timout is reached
374+
# @raise [Concurrent::TimeoutError] when timeout is reached
375375
#
376376
# @!macro agent_await_warning
377377
def await_for!(timeout)
@@ -477,7 +477,7 @@ def await_for(timeout, *agents)
477477
# @param [Array<Concurrent::Agent>] agents the Agents on which to wait
478478
# @return [Boolean] true if all actions complete before timeout
479479
#
480-
# @raise [Concurrent::TimeoutError] when timout is reached
480+
# @raise [Concurrent::TimeoutError] when timeout is reached
481481
# @!macro agent_await_warning
482482
def await_for!(timeout, *agents)
483483
raise Concurrent::TimeoutError unless await_for(timeout, *agents)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ module Async
218218

219219
# @!method self.new(*args, &block)
220220
#
221-
# Instanciate a new object and ensure proper initialization of the
221+
# Instantiate a new object and ensure proper initialization of the
222222
# synchronization mechanisms.
223223
#
224224
# @param [Array<Object>] args Zero or more arguments to be passed to the
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class Atom < Synchronization::Object
113113
# @option opts [Proc] :validator (nil) Optional proc used to validate new
114114
# values. It must accept one and only one argument which will be the
115115
# intended new value. The validator will return true if the new value
116-
# is acceptable else return false (preferrably) or raise an exception.
116+
# is acceptable else return false (preferably) or raise an exception.
117117
#
118118
# @!macro deref_options
119119
#
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require 'logger'
21
require 'concurrent/atomic/atomic_reference'
32

43
module Concurrent
@@ -8,10 +7,12 @@ module Concern
87
#
98
# @!visibility private
109
module Logging
11-
include Logger::Severity
10+
# The same as Logger::Severity but we copy it here to avoid a dependency on the logger gem just for these 7 constants
11+
DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN = 0, 1, 2, 3, 4, 5
12+
SEV_LABEL = %w[DEBUG INFO WARN ERROR FATAL ANY].freeze
1213

1314
# Logs through {Concurrent.global_logger}, it can be overridden by setting @logger
14-
# @param [Integer] level one of Logger::Severity constants
15+
# @param [Integer] level one of Concurrent::Concern::Logging constants
1516
# @param [String] progname e.g. a path of an Actor
1617
# @param [String, nil] message when nil block is used to generate the message
1718
# @yieldreturn [String] a message
@@ -23,7 +24,7 @@ def log(level, progname, message = nil, &block)
2324
end
2425
logger.call level, progname, message, &block
2526
rescue => error
26-
$stderr.puts "`Concurrent.configuration.logger` failed to log #{[level, progname, message, block]}\n" +
27+
$stderr.puts "`Concurrent.global_logger` failed to log #{[level, progname, message, block]}\n" +
2728
"#{error.message} (#{error.class})\n#{error.backtrace.join "\n"}"
2829
end
2930
end
@@ -33,8 +34,10 @@ def log(level, progname, message = nil, &block)
3334
module Concurrent
3435
extend Concern::Logging
3536

36-
# @return [Logger] Logger with provided level and output.
37-
def self.create_simple_logger(level = Logger::FATAL, output = $stderr)
37+
# Create a simple logger with provided level and output.
38+
def self.create_simple_logger(level = :FATAL, output = $stderr)
39+
level = Concern::Logging.const_get(level) unless level.is_a?(Integer)
40+
3841
# TODO (pitr-ch 24-Dec-2016): figure out why it had to be replaced, stdlogger was deadlocking
3942
lambda do |severity, progname, message = nil, &block|
4043
return false if severity < level
@@ -52,21 +55,23 @@ def self.create_simple_logger(level = Logger::FATAL, output = $stderr)
5255

5356
output.print format "[%s] %5s -- %s: %s\n",
5457
Time.now.strftime('%Y-%m-%d %H:%M:%S.%L'),
55-
Logger::SEV_LABEL[severity],
58+
Concern::Logging::SEV_LABEL[severity],
5659
progname,
5760
formatted_message
5861
true
5962
end
6063
end
6164

6265
# Use logger created by #create_simple_logger to log concurrent-ruby messages.
63-
def self.use_simple_logger(level = Logger::FATAL, output = $stderr)
66+
def self.use_simple_logger(level = :FATAL, output = $stderr)
6467
Concurrent.global_logger = create_simple_logger level, output
6568
end
6669

67-
# @return [Logger] Logger with provided level and output.
70+
# Create a stdlib logger with provided level and output.
71+
# If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+.
6872
# @deprecated
69-
def self.create_stdlib_logger(level = Logger::FATAL, output = $stderr)
73+
def self.create_stdlib_logger(level = :FATAL, output = $stderr)
74+
require 'logger'
7075
logger = Logger.new(output)
7176
logger.level = level
7277
logger.formatter = lambda do |severity, datetime, progname, msg|
@@ -93,7 +98,7 @@ def self.create_stdlib_logger(level = Logger::FATAL, output = $stderr)
9398

9499
# Use logger created by #create_stdlib_logger to log concurrent-ruby messages.
95100
# @deprecated
96-
def self.use_stdlib_logger(level = Logger::FATAL, output = $stderr)
101+
def self.use_stdlib_logger(level = :FATAL, output = $stderr)
97102
Concurrent.global_logger = create_stdlib_logger level, output
98103
end
99104

@@ -103,7 +108,7 @@ def self.use_stdlib_logger(level = Logger::FATAL, output = $stderr)
103108
NULL_LOGGER = lambda { |level, progname, message = nil, &block| }
104109

105110
# @!visibility private
106-
GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(Logger::WARN))
111+
GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(:WARN))
107112
private_constant :GLOBAL_LOGGER
108113

109114
def self.global_logger

0 commit comments

Comments
 (0)