After upgrading ruby31 to ruby32, portupgrade gives an error

Code:
diff -u -r orig/pkgtools.rb new/pkgtools.rb
--- orig/pkgtools.rb    2024-03-12 18:15:46.390149000 +0200
+++ new/pkgtools.rb     2024-03-12 17:36:39.681074000 +0200
@@ -524,7 +524,7 @@
   # If a fixed/custom script(1) is installed by the port, use that version.
   # See #8
   custom_script = "#{PREFIX}/libexec/pkgtools/script"
-  if File.exists?(custom_script)
+  if File.exist?(custom_script)
     $script_path = custom_script
   else
     $script_path = '/usr/bin/script'
diff -u -r orig/portsclean new/portsclean
--- orig/portsclean     2024-03-12 18:15:46.337548000 +0200
+++ new/portsclean      2024-03-12 17:33:00.573364000 +0200
@@ -282,7 +282,7 @@
   msg = " --> Running ldconfig -m"

   dirs.each do |d|
-    dirs.delete(d) if ! (File.exists?(d) && File.stat(d).directory?)
+    dirs.delete(d) if ! (File.exist?(d) && File.stat(d).directory?)
   end

   case dirs.size
 
Back
Top