From d4d9e22ddb5ced060e7eda467b47f4bc2d4e212f Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Fri, 20 Sep 2024 15:01:44 +0900 Subject: [PATCH] Use each instead of each_with_index It is trivial, but apparently index is not used at all in this method. Signed-off-by: Kentaro Hayashi --- lib/fluent/event_router.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/event_router.rb b/lib/fluent/event_router.rb index 9a133b5c6b..61793dcdd3 100644 --- a/lib/fluent/event_router.rb +++ b/lib/fluent/event_router.rb @@ -286,7 +286,7 @@ def reset_optimization def find(tag) pipeline = nil - @match_rules.each_with_index { |rule, i| + @match_rules.each do |rule| if rule.match?(tag) if rule.collector.is_a?(Plugin::Filter) pipeline ||= Pipeline.new