From 9ad7767aba737fc19496a5475083c45048210180 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Mon, 27 Feb 2012 10:10:34 -0800
Subject: Merge pull request #5179 from RalphShnelvar/Binary_mode_Window_bug

Binary mode window bug
---
 activesupport/lib/active_support/core_ext/file/atomic.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activesupport')

diff --git a/activesupport/lib/active_support/core_ext/file/atomic.rb b/activesupport/lib/active_support/core_ext/file/atomic.rb
index 3645597301..fd1633ff45 100644
--- a/activesupport/lib/active_support/core_ext/file/atomic.rb
+++ b/activesupport/lib/active_support/core_ext/file/atomic.rb
@@ -16,7 +16,7 @@ class File
     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
 
-- 
cgit v1.2.3