Permalink
Browse files

Merge pull request #5179 from RalphShnelvar/Binary_mode_Window_bug

Binary mode window bug
  • Loading branch information...
1 parent 5c18b99 commit 47c3cf1f4f08f1616fa964b55c4d8c31119a1992 @tenderlove tenderlove committed Feb 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/file/atomic.rb
@@ -16,7 +16,7 @@ def self.atomic_write(file_name, temp_dir = Dir.tmpdir)
require 'tempfile' unless defined?(Tempfile)
require 'fileutils' unless defined?(FileUtils)
- temp_file = Tempfile.new(basename(file_name), temp_dir)
+ temp_file = Tempfile.new(basename(file_name), temp_dir, :binmode => true)
yield temp_file
temp_file.close

0 comments on commit 47c3cf1

Please sign in to comment.