From d7c1588fd5458f0fc252c9d1e74e538159a2a215 Mon Sep 17 00:00:00 2001 From: Rophy Tsai Date: Wed, 28 Feb 2024 19:41:18 +0800 Subject: [PATCH] fix: File.exists() is deprecated and removed in Ruby 3.2.0 --- lib/fluent/plugin/in_sql.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/plugin/in_sql.rb b/lib/fluent/plugin/in_sql.rb index 426aab1..5dc040f 100644 --- a/lib/fluent/plugin/in_sql.rb +++ b/lib/fluent/plugin/in_sql.rb @@ -282,7 +282,7 @@ def initialize(path) require 'yaml' @path = path - if File.exists?(@path) + if File.exist?(@path) @data = YAML.load_file(@path) if @data == false || @data == [] # this happens if an users created an empty file accidentally