diff options
author | Ralph Shnelvar <ralphs@dos32.com> | 2012-02-25 15:35:29 -0700 |
---|---|---|
committer | Ralph Shnelvar <ralphs@dos32.com> | 2012-02-25 15:35:29 -0700 |
commit | 06dc8ed28900246436003bf32dc2579af12f4846 (patch) | |
tree | 2c4d75fd9de7abbf6238ba2bbd671f9f21e6f118 /activesupport/lib/active_support/core_ext/file | |
parent | b229bc70e50ec0887c5bb3aaaa9c6ee8af054026 (diff) | |
download | rails-06dc8ed28900246436003bf32dc2579af12f4846.tar.gz rails-06dc8ed28900246436003bf32dc2579af12f4846.tar.bz2 rails-06dc8ed28900246436003bf32dc2579af12f4846.zip |
Fixing Windows asset tag helper test failure
In asset_tag_helper_test.rb there is an assert on the number of bytes in a
concatenated file. This test failed because Windows converts \n to \r\n as
the default for "w". This is different than in *nix systems where there is
no conversion done.
THe test that failed was test_caching_stylesheet_link_tag_when_caching_on
Using bin mode fixes this behavior on windows and makes no change on the
*nix systems.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/file')
-rw-r--r-- | activesupport/lib/active_support/core_ext/file/atomic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |