David A. Black wrote: > Hi -- > > On Thu, 24 Nov 2005, Robert Klemme wrote: > >> jemptymethod / gmail.com wrote: >>> I'm brand new to ruby, as in, one hour! So along with perhaps >>> answering my very basic question, please feel free to point me to >>> other resources on the web >>> >>> How do I fix the following so that entering 'q' indeed breaks out of >>> the loop? I've read the following but think I will need to see an >>> example to truly understand. >>> >>> Thanks in advance >>> >>> BTW I always learn new language basics by figuring out how to >>> convert to roman numerals >>> >>> >>> arabic = ' ' >>> while arabic != 'q' do >>> puts "Enter a whole number from 1 to 3999 for conversion" >>> puts "to Roman Numerals (enter 'q' to exit)" >>> arabic = gets >>> end >> >> Here's another way to do it >> >> begin >> puts "Enter a whole number from 1 to 3999 for conversion" >> puts "to Roman Numerals (enter 'q' to exit)" >> arabic = gets.chomp >> end until arabic == 'q' > > Although... see ruby-core 6745. Matz doesn't like this construct, and > it may disappear. Thanks, I wasn't aware of that. Although I agree with him on the inconsistency issue I don't like the alternative approach for post test loops either. I'd prefer something more in line with what other languages do - probably begin ... while foo > 0 do ... while foo > 0 But then again, I can't estimate how hard this would be for the parser... Kind regards robert