diff options
-rw-r--r-- | railties/lib/rails/secrets.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/secrets.rb b/railties/lib/rails/secrets.rb index 46e21185d7..0883857c55 100644 --- a/railties/lib/rails/secrets.rb +++ b/railties/lib/rails/secrets.rb @@ -100,7 +100,8 @@ module Rails end def writing(contents) - tmp_path = File.join(Dir.tmpdir, File.basename(path)) + tmp_file = "#{File.basename(path)}.#{Process.pid}" + tmp_path = File.join(Dir.tmpdir, tmp_file) IO.binwrite(tmp_path, contents) yield tmp_path |