From: bdimych@... Date: 2014-01-19T21:33:19+00:00 Subject: [ruby-core:59876] [ruby-trunk - Bug #9431] [Open] In windows ruby IO.write returns count of bytes without count of CR character Issue #9431 has been reported by Dmitry Bolshakov. ---------------------------------------- Bug #9431: In windows ruby IO.write returns count of bytes without count of CR character https://bugs.ruby-lang.org/issues/9431 * Author: Dmitry Bolshakov * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby 2.0.0p247 (2013-06-27) [i386-mingw32] * Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- C:\Users\bdimych>ruby -e "p IO.write('temp.txt', %Q(123\n)); p File.size('temp.txt')" 4 5 imho it looks unexpected -- http://bugs.ruby-lang.org/