aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorVladimir Dementyev <dementiev.vm@gmail.com>2019-02-05 14:19:08 -0500
committerVladimir Dementyev <dementiev.vm@gmail.com>2019-02-05 14:19:14 -0500
commita1ebe509dd5b9c760fb4fab7e5ecc27eea332741 (patch)
tree6083021ec6e0882b5f3bc782871a3817b86b3982 /activesupport
parent2299d31c4cad93992c6bacba21e01fcdd93e0930 (diff)
downloadrails-a1ebe509dd5b9c760fb4fab7e5ecc27eea332741.tar.gz
rails-a1ebe509dd5b9c760fb4fab7e5ecc27eea332741.tar.bz2
rails-a1ebe509dd5b9c760fb4fab7e5ecc27eea332741.zip
Add missing `require "tmpdir"` in ActiveSupport::EncryptedFile
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/encrypted_file.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/encrypted_file.rb b/activesupport/lib/active_support/encrypted_file.rb
index c66f1b557e..2b7db568a5 100644
--- a/activesupport/lib/active_support/encrypted_file.rb
+++ b/activesupport/lib/active_support/encrypted_file.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "pathname"
+require "tmpdir"
require "active_support/message_encryptor"
module ActiveSupport
@@ -67,7 +68,7 @@ module ActiveSupport
write(updated_contents) if updated_contents != contents
ensure
- FileUtils.rm(tmp_path) if tmp_path.exist?
+ FileUtils.rm(tmp_path) if tmp_path&.exist?
end