Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Binary mode window bug #5179

Merged
merged 1 commit into from

2 participants

@RalphShnelvar

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.

@RalphShnelvar RalphShnelvar 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.
06dc8ed
@tenderlove tenderlove merged commit b543f8f into rails:3-2-stable
@42he 42he referenced this pull request from a commit
@lest lest remove checks for encodings availability 1e9e88f
@42he 42he referenced this pull request
Closed

Reintroduced Bug #5179 #12179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 25, 2012
  1. @RalphShnelvar

    Fixing Windows asset tag helper test failure

    RalphShnelvar authored
    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.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/core_ext/file/atomic.rb
View
2  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
Something went wrong with that request. Please try again.