Ah ha! Indeed I am on Windows. I knew about the LF to CRLF conversion,
but it never struck me.
To make a long story short, I tried to open the file with mode a+b which
was what I needed. Then @SaveFile.pos quit working on me even after
@SaveFile.rewind, it would write to the end of the file. So I
@SaveFile.binmode and BOOM, my first Ruby script is now working as
intended!
Thank you so very much. I never would of figured it would do the
conversion when not in binary mode.
So now the REAL question is, am I to blame or is Windows? :P (don't
answer that)
Thanks again, you truly made my night!
-Minic
--
Posted via
http://www.ruby-forum.com/.