This row solved my problem,
 if op == "Q\n"
I was not aware of this little new line thing

Cheers everyone

-- 
Posted via http://www.ruby-forum.com/.