From 110cec781e9c678e969fbbb22a5b4ce498a4f4f0 Mon Sep 17 00:00:00 2001 From: James Ottaway Date: Tue, 2 Jan 2024 10:41:05 +1000 Subject: [PATCH] Prefer `File.exist?` over `File.exists?` Ruby 3.2 dropped support for the old alias, so this needs to change now. See https://bugs.ruby-lang.org/issues/17391 --- lib/pgp/gpg/temp_path_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pgp/gpg/temp_path_helper.rb b/lib/pgp/gpg/temp_path_helper.rb index 7f56bb2..86d2886 100644 --- a/lib/pgp/gpg/temp_path_helper.rb +++ b/lib/pgp/gpg/temp_path_helper.rb @@ -15,7 +15,7 @@ def self.create(&block) private def self.delete(path) - if File.exists?(path) + if File.exist?(path) File.delete(path) end end @@ -24,4 +24,4 @@ def self.random_string(length=20) (0...length).map { (65 + rand(26)).chr }.join end end -end \ No newline at end of file +end