Zach Dennis wrote:

> By reading this output you would think it is in Unix format (LF), but it is
> actually in DOS (CR/LF) file format.

Ruby automatically converts platform-specific (\r\n in your case) 
newlines to platform-independent newlines (\n). This is a feature.

If you don't want any line ending conversations to happen just specify 
the binary mode like this: File.open("filename", "rb") { ... }

Regards,
Florian Gross