From: Luis Lavena Date: 2011-08-06T07:27:12+09:00 Subject: [ruby-core:38822] Line endings, bug/regression or feature of 1.9.3? Hello, Seems Redmine is down, so emailing the list. One user detected that Ruby 1.9.3-preview1 and latest changes in ruby_1_9_3 branch generates incorrectly line endings on Windows. It seems that now, by default, it uses LF instead of CRLF for writing, unless you explicitly indicate text-mode ('t') Full investigation of the user is found here: http://groups.google.com/group/rubyinstaller/msg/65cd1284e10ffe71 And simple test: V:\>ruby -ve "n = 'foo.txt'; File.open(n, 'w') { |f| f.puts 'Hello' }; puts File.size(n)" ruby 1.9.3dev (2011-08-06 revision 32868) [i386-mingw32] 6 Hello + CRLF should have been 7 bytes V:\>ruby -ve "n = 'foo.txt'; File.open(n, 'wt') { |f| f.puts 'Hello' }; puts File.size(n)" ruby 1.9.3dev (2011-08-06 revision 32868) [i386-mingw32] 7 V:\>ruby -ve "n = 'foo.txt'; File.open(n, 'wb') { |f| f.puts 'Hello' }; puts File.size(n)" ruby 1.9.3dev (2011-08-06 revision 32868) [i386-mingw32] 6 Is this an intended change? is not mentioned on NEWS. I personally don't complain (we all know the pain of binary versus text-mode for opening files) but seems to be a huge difference between 1.9.2 and 1.9.3 Please comment. Thank you. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup�ry