Stop writing non-portable Ruby file-management code.
Understand once and for all how, when, and why to open files in binary mode.
A little history lesson about computer text formats
Windows users can feel like second-class-citizens in the Ruby world. Ruby gems and tools often don't work quite right on Windows hosts. But we can fix this. Making your code …