From 4225c04c96918005bd29e302158b0fde2a70eebe Mon Sep 17 00:00:00 2001 From: Rory Molinari Date: Wed, 20 Aug 2025 10:49:42 -0400 Subject: [PATCH] Ruby 3.2 got rid of File.exists? Now it's File.exist? Aside: this was a baffling decision by the Ruby team. --- bin/repl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 bin/repl diff --git a/bin/repl b/bin/repl old mode 100644 new mode 100755 index 7daaebf..5900665 --- a/bin/repl +++ b/bin/repl @@ -42,16 +42,16 @@ if ARGV.include? '--man' end completion_dir = ENV['REPL_COMPLETION_DIR'] || "~/.repl" -if File.exists?(cdir = File.expand_path(completion_dir)) +if File.exist?(cdir = File.expand_path(completion_dir)) script = ARGV.detect { |a| a !~ /^-/ } if script cfile = Dir[cdir + '/' + File.basename(script)].first - cfile = nil if cfile && !File.exists?(cfile) + cfile = nil if cfile && !File.exist?(cfile) end end history_dir = ENV['REPL_HISTORY_DIR'] || "~/" -if File.exists?(hdir = File.expand_path(history_dir)) +if File.exist?(hdir = File.expand_path(history_dir)) if script = ARGV.detect { |a| a !~ /^-/ } script = File.basename(script) hfile = "#{hdir}/.#{script}_history"