Test: fix ruby script in 010.rewrite_timestamp.
authorTatsuo Ishii <ishii@postgresql.org>
Fri, 29 Aug 2025 07:15:55 +0000 (16:15 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Fri, 29 Aug 2025 07:15:55 +0000 (16:15 +0900)
The ruby script used "File.exists", which is said to be obsoleted in
newer version of Ruby.  Replace it with "File.exist".

Backpatch-through: v4.2

src/test/regression/tests/010.rewrite_timestamp/timestamp/run-test

index 9b1a6e293cd199332173a8f0162aa15b97f6956a..d81102f3bc2d9f7c4db980f12b79ac349881f9b0 100755 (executable)
@@ -23,12 +23,12 @@ if ARGV.size != 1
 end
 
 file = ARGV.shift
-if !(File.exists? file)
+if !(File.exist? file)
   STDERR.puts "run-test: file does not exist: #{file}"
   exit 1
 end
 
-if !(File.exists? RESULT_DIRECTORY)
+if !(File.exist? RESULT_DIRECTORY)
   Dir.mkdir RESULT_DIRECTORY
 else
   Dir["#{RESULT_DIRECTORY}/*.out"].each do |f|
@@ -36,7 +36,7 @@ else
   end
 end
 
-File.unlink DIFF_FILE if File.exists? DIFF_FILE
+File.unlink DIFF_FILE if File.exist? DIFF_FILE
 
 begin
   IO.foreach(file) do |testcase|