Skip to content

Commit f3c6a1e

Browse files
committed
Support kwargs in initializer when mixing in Concurrent::Async
Classes with keyword arguments in their initializers cannot be initialized today if they include Concurrent::Async, as of Ruby 3.0.
1 parent 00232e3 commit f3c6a1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/concurrent-ruby/concurrent/async.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ def self.included(base)
267267

268268
# @!visibility private
269269
module ClassMethods
270-
def new(*args, &block)
271-
obj = original_new(*args, &block)
270+
def new(*args, **kwargs, &block)
271+
obj = original_new(*args, **kwargs, &block)
272272
obj.send(:init_synchronization)
273273
obj
274274
end

0 commit comments

Comments
 (0)