From: hal9000@... Date: 2000-12-22T07:40:02+09:00 Subject: [ruby-talk:7922] Re: beginner's problem In article , John Rubinubi wrote: > Hi, > > Where am I going wrong? > > st='x' > #st=gets > if st=='x' > puts 'it's x' > else > puts 'not x' > end > > as written it prints "it's x" as expected but if I take away the # and > execute the st=gets line it's never x. > > Thanks, > John Newline at the end. Use chop or chomp. HF -- Hal Fulton Sent via Deja.com http://www.deja.com/