From 92852d9065d49b3dad8c09fdfd002f399ffda53e Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Tue, 14 Jan 2025 17:34:31 +0900 Subject: [PATCH] out_file: remove workaround for Ruby 2.7 and 3.0 on macOS Signed-off-by: Shizuo Fujita --- lib/fluent/plugin/out_file.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/fluent/plugin/out_file.rb b/lib/fluent/plugin/out_file.rb index 19c0afa8ef..ae47114a20 100644 --- a/lib/fluent/plugin/out_file.rb +++ b/lib/fluent/plugin/out_file.rb @@ -189,13 +189,6 @@ def configure(conf) @dir_perm = system_config.dir_permission || Fluent::DEFAULT_DIR_PERMISSION @file_perm = system_config.file_permission || Fluent::DEFAULT_FILE_PERMISSION @need_lock = system_config.workers > 1 - - # https://github.com/fluent/fluentd/issues/3569 - @need_ruby_on_macos_workaround = false - if @append && Fluent.macos? - condition = Gem::Dependency.new('', [">= 2.7.0", "< 3.1.0"]) - @need_ruby_on_macos_workaround = true if condition.match?('', RUBY_VERSION) - end end def multi_workers_ready? @@ -244,12 +237,7 @@ def write(chunk) def write_without_compression(path, chunk) File.open(path, "ab", @file_perm) do |f| - if @need_ruby_on_macos_workaround - content = chunk.read() - f.puts content - else - chunk.write_to(f) - end + chunk.write_to(f) end end