From: Xavier Noria Date: 2009-08-19T02:19:54+09:00 Subject: Re: fromdos dos2unix in ruby 2009/8/18 Robert Dober : > If performance can be an issue we could use File#each with 10.chr as a seperator > >     in.each 10.chr do | line | >         out.print line.sub( /\r\n\z/, 10.chr ) >     end Just for the record... in Ruby "\n" == 10.chr in all platforms. I find "\n" to be more obvious.