1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Generator copies files in binary mode. References #3156.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2005-12-09 18:36:34 +00:00
parent dc106b932c
commit 3fb5828621
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Generator copies files in binary mode. #3156 [minimudboy@gmail.com]
* Add builtin/ to the gemspec. Closes #3047. [Nicholas Seckar, Sam Stephenson]
* Add install.rb file to plugin generation which is loaded, if it exists, when you install a plugin. [Marcel Molina Jr.]

View file

@ -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