Skip to content

Commit 66151eb

Browse files
committed
Support Ruby 3.0.0 keyword arguments interop
Ruby 3.0.0 keywords arguments do not permit Hash <-> keyword arguments interop. Instead, we should add a double asterisk operator(`**`) for it. Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
1 parent bcf0e56 commit 66151eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/fluent/plugin/out_kafka.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def emit(tag, es, chain)
215215
chain.next
216216

217217
# out_kafka is mainly for testing so don't need the performance unlike out_kafka_buffered.
218-
producer = @kafka.producer(@producer_opts)
218+
producer = @kafka.producer(**@producer_opts)
219219

220220
es.each do |time, record|
221221
if @output_include_time

lib/fluent/plugin/out_kafka_buffered.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def get_producer
239239
@producers_mutex.synchronize {
240240
producer = @producers[Thread.current.object_id]
241241
unless producer
242-
producer = @kafka.producer(@producer_opts)
242+
producer = @kafka.producer(**@producer_opts)
243243
@producers[Thread.current.object_id] = producer
244244
end
245245
producer

0 commit comments

Comments
 (0)