From: "Wayne E. Seguin" Date: 2007-07-15T20:49:36+09:00 Subject: Re: help ruby noob write a hitEnterToContinue() method --Apple-Mail-3-34543709 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Jul 15, 2007, at 07:40 , David Lam wrote: > > > i = 0 > @doc.traverse_text { |text| > puts "#{i}: " + text.to_s.strip + "\n" > i += 1 > } > > > > > def hit_enter_to_continue > gets s > chomp > if( $_ == "x") > break > end > end Try using getch. -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin@gmail.com --Apple-Mail-3-34543709--