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/.