Use File.exist? instead of File.exists?

We've noticed the following warning while testing the upgrade to
Ruby 3.0:

warning: File.exists? is deprecated; use File.exist? instead

We're adding a Rubocop rule so we don't call the deprecated method
in the future.
This commit is contained in:
Javi Martín
2023-01-14 22:24:08 +01:00
parent 023bc6eb59
commit 5e7b3f72a2
3 changed files with 19 additions and 16 deletions

View File

@@ -164,6 +164,9 @@ Lint/BooleanSymbol:
Lint/ConstantDefinitionInBlock:
Enabled: true
Lint/DeprecatedClassMethods:
Enabled: true
Lint/DuplicateBranch:
Enabled: true