From: Sam Duncan Date: 2011-01-28T07:56:33+09:00 Subject: Re: HELP! New to Ruby and need to debug for work! Chomp! Error Have you got the debug flag turned on, and does it output anything to the console? I would expect it to say something like; srv> nil ... in which case the socket gets method is returning nil for whatever reason. If you just wanted to ignore it, you could have it return an empty string or something if l == nil and see what breaks further down the line. Maybe the socket connection is going away, or there is nothing more to read off the socket? I'm not familiar enough with Ruby's socket libraries or the Classes/ Methods therein sorry. def readline(f) l = f.gets puts "srv> %s" % l if $debug if l.kind_of?(String) l.chomp! end l end Sam On 28/01/11 11:26, Doug Blackman wrote: > Thanks for replying Sam. I just tried it and got the same error > message. > >