diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-07-09 17:08:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-09 17:08:49 +0200 |
commit | b362ce6d544a1dcaef08eaf2c685f8495f94c51c (patch) | |
tree | f1e69e68d7db1e5a4e261db1350f4fcdbec882e2 /railties/lib/rails/secrets.rb | |
parent | bed328c888ea35b08ad1c25ffe5f3c421ae2312e (diff) | |
parent | be4ebc47807948ed8d40c04d0a134f7de1ec0fc2 (diff) | |
download | rails-b362ce6d544a1dcaef08eaf2c685f8495f94c51c.tar.gz rails-b362ce6d544a1dcaef08eaf2c685f8495f94c51c.tar.bz2 rails-b362ce6d544a1dcaef08eaf2c685f8495f94c51c.zip |
Merge pull request #29721 from y-yagi/fix_29696
Treat secrets as binary
Diffstat (limited to 'railties/lib/rails/secrets.rb')
-rw-r--r-- | railties/lib/rails/secrets.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/secrets.rb b/railties/lib/rails/secrets.rb index 955ab096e8..46e21185d7 100644 --- a/railties/lib/rails/secrets.rb +++ b/railties/lib/rails/secrets.rb @@ -101,11 +101,11 @@ module Rails def writing(contents) tmp_path = File.join(Dir.tmpdir, File.basename(path)) - File.write(tmp_path, contents) + IO.binwrite(tmp_path, contents) yield tmp_path - updated_contents = File.read(tmp_path) + updated_contents = IO.binread(tmp_path) write(updated_contents) if updated_contents != contents ensure |