From a1ebe509dd5b9c760fb4fab7e5ecc27eea332741 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Tue, 5 Feb 2019 14:19:08 -0500 Subject: Add missing `require "tmpdir"` in ActiveSupport::EncryptedFile --- activesupport/lib/active_support/encrypted_file.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport') 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 -- cgit v1.2.3