Closed taw closed 1 year ago
$ cat hello #!/usr/bin/env ruby puts "Hello, world!" $ rescue hello /Users/taw/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/pry-rescue-1.5.2/bin/rescue:55:in `<top (required)>': undefined method `exists?' for File:Class (NoMethodError) if File.exists? script ^^^^^^^^ Did you mean? exist? from /Users/taw/.rbenv/versions/3.2.2/bin/rescue:25:in `load' from /Users/taw/.rbenv/versions/3.2.2/bin/rescue:25:in `<main>'
From changelog for Ruby 3.2.
The fix is to just use File.exist? instead of File.exists?
File.exist?
File.exists?
+1
From changelog for Ruby 3.2.
The fix is to just use
File.exist?
instead ofFile.exists?