From: 7stud -- Date: 2011-03-12T07:57:50+09:00 Subject: Re: Is an elsif loop possible? Devin Rawlek wrote in post #986991: > Thank you Steve. That was exactly what I needed. > > This works perfectly. > > $Str = gets.chomp > $Str.to_i < 0 What is that line for? As written it does nothing: the comparison evaluates to either true or false and then the value is discarded. > until $Str.to_i > 0 Note that any until loop can be written as a while loop: while $Str.to_i <= 0 and while loops are much clearer in meaning. -- Posted via http://www.ruby-forum.com/.