From: Michael Morin Date: 2009-05-06T12:16:44+09:00 Subject: Re: if string = "mike" then print "Hi mike" I've gotten into the habit of using gets.chomp when reading input of any kind. It's so easy to forget that newlines are still on there. On Tue, May 5, 2009 at 10:56 PM, Nobuyoshi Nakada wrote: > Hi, > > At Wed, 6 May 2009 10:43:23 +0900, > Bigmac Turdsplash wrote in [ruby-talk:335871]: >> so, im only a few days into ruby, im working on some tcp and there is a >> problem with my client.rb... if str == ???? this if statement is always >> skipped and im not sure why? > > #gets method returns a string with a newline if you ended the > input with enter.  You can chomp it or use double Ctrl-D > instead of enter. > > -- > Nobu Nakada > >