From: "U.Nakamura" Date: 2009-08-05T11:05:57+09:00 Subject: [ruby-core:24769] Re: Is this a bug? Hello, In message "[ruby-core:24665] Is this a bug?" on Aug.01,2009 22:37:59, wrote: > With this code: > > File.open('test.rb', 'w') do |f| f.write "line1\r\nline22"; end > puts ( File.read('test.rb').inspect) The real output of "\r\n" in text mode is 0x0D 0x0D 0x0A in both 1.8 and 1.9. And, when single 0x0D exist together to 0x0D 0x0A, it is undefined how to treat them on reading. The word ``undefined'' means that ruby doesn't guarantee what occurs. As a matter of fact, bccwin32 1.8 treat 0x0D 0x0D 0xA as "\n". mswin32/mingw32 1.8 treat them as "\r\n". mswin32/mingw32 1.9 treat them as "\n\n". Regards, -- U.Nakamura