From: Jeffrey Bowen Date: 2007-07-13T22:31:54+09:00 Subject: Re: gets Thanks Sometime I'm just slow. I tried "test.chomp = gets" but I didn't try "test = gets.chomp". The error message most likely told me what was wrong. Thanks Jeff --- Jeffrey Bowen wrote: > Of course the code below will not work because gets > is > adding /n to the entry. I know that chomp will > remove > the /n but is there away to cut the /n without > reassigning test1 to another variable IE test2 = > test1.comp > > print "test1 " > test1 = gets > puts test1.class > if test1 == "1" > puts "step 1" > else > puts "step 2" > end > > Thanks > Jeff > > > > ____________________________________________________________________________________Ready > for the edge of your seat? > Check out tonight's top picks on Yahoo! TV. > http://tv.yahoo.com/ > > ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7