Gene Tani
3/30/2007 7:09:00 PM
On Mar 30, 12:00 pm, JervisT...@ruby-lang.org (d...@o2.ie) wrote:
> Hi all, just started looking at Ruby in earnest today and my logic has failed me already. Can
> someone provide some subtle hints are to where the following code needs attension. Its currently
> stuck in a continuous loop, and 'q' doesnt exit the loop.
>
> #a continous loop until 'q' is press
> puts "Please enter your name?"
> name=gets
> while (name!='q')
> puts "welcome, #{name}Enter your name again:"
> name=gets
>
> end
>
irb(main):024:0> name=gets
wha
=> "wha\n"