Alright, thanks for helping me narrow it down. I managed to make it work 
by retyping the program myself rather than copy-pasting. I guess it was 
some "junk" character coming off the website that was confusing the 
interpreter. It's working fine now, and I can get on with learning Ruby.
A huge thank you to everyone who replied. :)
-- 
Posted via http://www.ruby-forum.com/.