From 998aac99fe1f491d15c1e65ddb14f15154caf091 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 31 Mar 2021 13:35:44 +0200 Subject: [PATCH] Workaround false warning: parameter 'x' in is not used. record_transformer uses the `has_key()` method, not the `key()` method. Closes #161 (hopefully :-) ) --- lib/fluent/plugin/out_splunk.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/plugin/out_splunk.rb b/lib/fluent/plugin/out_splunk.rb index 2d6fb8d..7d57849 100644 --- a/lib/fluent/plugin/out_splunk.rb +++ b/lib/fluent/plugin/out_splunk.rb @@ -209,7 +209,7 @@ def configure_fields(conf) # This loop looks dump, but it is used to suppress the unused parameter configuration warning # Learned from `filter_record_transformer`. conf.elements.select { |element| element.name == 'fields' }.each do |element| - element.each_pair { |k, _v| element.key?(k) } + element.each_pair { |k, _v| element.has_key?(k) } end return unless @fields