diff --git a/lib/fluent/plugin/os.rb b/lib/fluent/plugin/os.rb index 87b6cfb..25b7c3c 100644 --- a/lib/fluent/plugin/os.rb +++ b/lib/fluent/plugin/os.rb @@ -34,7 +34,7 @@ def self.debian? def self.os_name_ubuntu? os_name = 'not_found' file_name = '/etc/os-release' - if File.exists?(file_name) + if File.exist?(file_name) IO.foreach(file_name).each do |line| if line.start_with?('ID=') os_name = line.split('=')[1].strip @@ -52,7 +52,7 @@ def self.os_name_ubuntu? def self.os_name_debian? os_name = 'not_found' file_name = '/etc/os-release' - if File.exists?(file_name) + if File.exist?(file_name) File.foreach(file_name).each do |line| if line.start_with?('ID=') os_name = line.split('=')[1].strip