Skip to content

Commit

Permalink
Use File.exist?
Browse files Browse the repository at this point in the history
`File.exists?` was deprecated while ago and removed in Ruby 3.2.

https://bugs.ruby-lang.org/issues/17391
ruby/ruby#5352
  • Loading branch information
voxik authored and mcmire committed Jan 26, 2023
1 parent 1098f5b commit ee3aeb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exe/convert_to_should_syntax
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ usage("Temp directory '#{TMP}' is not valid. Set TMPDIR environment variable to

file = ARGV.shift
tmpfile = File.join(TMP, File.basename(file))
usage("File '#{file}' doesn't exist") unless File.exists?(file)
usage("File '#{file}' doesn't exist") unless File.exist?(file)

FileUtils.cp(file, tmpfile)
contents = File.read(tmpfile)
Expand Down

0 comments on commit ee3aeb2

Please sign in to comment.