From: Alan Davies Date: 2003-05-21T01:13:19+09:00 Subject: Bug in IO#write under windows If you write line breaks to a file under windows, the write and syswrite methods count a line break as one character, not two, meaning that the value returned is incorrect. e.g... File.open('arr.txt', 'w') do |file| arr = [ "123\n", "456" ] puts file.write(arr) end This bit of code displays the number 7 on the screen. The actual size of the file is 8. This is causing me problems with File#truncate, becuase I'm truncating too much of the file!