diff options
author | Andrew White <andrew.white@unboxed.co> | 2016-11-02 11:36:32 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2016-11-02 11:36:32 +0000 |
commit | d3bb345803cc1cad8da1e33f4d39232f15247bd4 (patch) | |
tree | 1a4558c593263a4e804065c81a7ccb861e888305 | |
parent | e61a279c2b73cb5ac7c9a18b2ff1b8a5a853c16f (diff) | |
download | rails-d3bb345803cc1cad8da1e33f4d39232f15247bd4.tar.gz rails-d3bb345803cc1cad8da1e33f4d39232f15247bd4.tar.bz2 rails-d3bb345803cc1cad8da1e33f4d39232f15247bd4.zip |
Fix File.exists? deprecation warnings in Active Support
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/file_update_checker.rb | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -71,7 +71,7 @@ platforms :mri_18 do end # Add your own local bundler stuff -instance_eval File.read '.Gemfile' if File.exists? '.Gemfile' +instance_eval File.read '.Gemfile' if File.exist? '.Gemfile' platforms :mri do group :test do diff --git a/activesupport/lib/active_support/file_update_checker.rb b/activesupport/lib/active_support/file_update_checker.rb index a4ad2da137..2e0e873fda 100644 --- a/activesupport/lib/active_support/file_update_checker.rb +++ b/activesupport/lib/active_support/file_update_checker.rb @@ -95,7 +95,7 @@ module ActiveSupport def updated_at #:nodoc: @updated_at || begin all = [] - all.concat @files.select { |f| File.exists?(f) } + all.concat @files.select { |f| File.exist?(f) } all.concat Dir[@glob] if @glob all.map { |path| File.mtime(path) }.max || Time.at(0) end |