diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-02-05 16:49:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 16:49:58 -0500 |
commit | 8d06c108c7af1e9a5db9f6d3c79fc5584cc3784e (patch) | |
tree | 9b0f0d53c2bf9d43edb77f7edf0c9ca870dd6b7d /activesupport/lib | |
parent | 0f3e8e1ebb1255bfda455753b1b2087315f46fdc (diff) | |
parent | a1ebe509dd5b9c760fb4fab7e5ecc27eea332741 (diff) | |
download | rails-8d06c108c7af1e9a5db9f6d3c79fc5584cc3784e.tar.gz rails-8d06c108c7af1e9a5db9f6d3c79fc5584cc3784e.tar.bz2 rails-8d06c108c7af1e9a5db9f6d3c79fc5584cc3784e.zip |
Merge pull request #35170 from palkan/fix/encrypted-file
Add missing `require "tmpdir"` in ActiveSupport::EncryptedFile
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/encrypted_file.rb | 3 |
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 |