diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-12-09 18:36:34 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-12-09 18:36:34 +0000 |
commit | 3fb58286211b0cf23b18aa26ba0a37fef6bf8745 (patch) | |
tree | 2f47c9eb9cd1178c2cbe95848db9cd1a879ad173 /railties/lib/rails_generator/commands.rb | |
parent | dc106b932cf7674151ec0162715407f5b2ec92f2 (diff) | |
download | rails-3fb58286211b0cf23b18aa26ba0a37fef6bf8745.tar.gz rails-3fb58286211b0cf23b18aa26ba0a37fef6bf8745.tar.bz2 rails-3fb58286211b0cf23b18aa26ba0a37fef6bf8745.zip |
Generator copies files in binary mode. References #3156.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/commands.rb')
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index 32a7b602d7..bd5754b72d 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -215,8 +215,8 @@ module Rails # if block given so templaters may render the source file. If a # shebang is requested, replace the existing shebang or insert a # new one. - File.open(destination, 'w') do |df| - File.open(source) do |sf| + File.open(destination, 'wb') do |df| + File.open(source, 'rb') do |sf| if block_given? df.write(yield(sf)) else |