Skip to content

Commit 83143e7

Browse files
committed
Dir.exists? was removed in Ruby 3.2.0. Use Dir.exist? instead.
1 parent 96735ee commit 83143e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/initializers/ensure_rails_git_is_cloned.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RAILS_GIT = "#{Rails.root}/rails.git"
22

3-
unless Dir.exists?(RAILS_GIT)
3+
unless Dir.exist?(RAILS_GIT)
44
puts <<~EOS
55
Please, mirror the Rails repository using the command
66

lib/application_utils.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def self.acquiring_lock_file(basename)
2121
# it if needed.
2222
def self.tmpdir
2323
tmpdir = File.join(Rails.root, 'tmp')
24-
Dir.mkdir(tmpdir) unless File.exists?(tmpdir)
24+
Dir.mkdir(tmpdir) unless File.exist?(tmpdir)
2525
tmpdir
2626
end
2727

@@ -37,7 +37,7 @@ def self.tmpdir
3737
def self.expire_cache
3838
cache_dir = Rails.application.config.action_controller.page_cache_directory
3939

40-
if Dir.exists?(cache_dir)
40+
if Dir.exist?(cache_dir)
4141
expired_cache = "#{tmpdir}/expired_cache.#{Time.now.to_f}"
4242
FileUtils.mv(cache_dir, expired_cache, force: true)
4343
FileUtils.rm_rf(expired_cache)

0 commit comments

Comments
 (0)