From: hazal Ates Date: 2010-07-28T20:43:02+09:00 Subject: Re: stop program with entering a key... Giampiero Zanchi wrote: > def menu > p "Write a number" > p "Q to stop" > the_replay = gets.chomp > end > > def do_exit > p "Bye bye" > exit > end > > while 1 == 1 do > the_reply = menu > case the_reply > when "q" then do_exit > when "Q" then do_exit > end > p the_reply > end thank you G. Z. i use your codes to my problem. -- Posted via http://www.ruby-forum.com/.