From: Robert Dober Date: 2006-06-22T18:59:30+09:00 Subject: Re: Newbie Questions ------=_Part_4128_9700360.1150970367676 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline you did well to look at the FAQ but I suppose that the solution is not there. You did even better to post the question here and got a correct answer, though maybe a little bit cryptic for a newcomer. Especially if you do not know irb Because irb(main):016:0> x = gets > 1 > => "1\n" > irb(main):017:0> x > => "1\n" "1\n" == "1" => false and menuChoiceString contains "1\n" not "1" BTW you might like this idiom case menuChoiceString.chomp when "1" do something clever when "2" do something smart else do something fancy end irb(main):018:0> x.strip > => "1" > irb(main):019:0 #strip is a good alternative to chomp , because it deletes all heading and trailing whitespace. If on the other hand heading and trailing whitespace is meaningful in the input be careful to use #chomp -- Elliot Temple > http://www.curi.us/blog/ If there are more question on this topic feel free to ask off list too. Hopefully I was clear enough (time is a constraint in my job :( ) Cheers Robert ------=_Part_4128_9700360.1150970367676--