The doc is fine, this happens only if you try to execute 'until' block interactively using eval.rb, but if you put the whole 'until' block inside a script, it works. Dat >From: Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> >Reply-To: ruby-talk / netlab.co.jp >To: ruby-talk / netlab.co.jp (ruby-talk ML) >Subject: [ruby-talk:02071] Re: eval.rb fails >Date: Wed, 22 Mar 2000 09:29:33 +0000 (GMT) > >On Wed, 22 Mar 2000, Yukihiro Matsumoto wrote: > > > Hi, > > > > In message "[ruby-talk:02057] eval.rb fails" > > on 00/03/21, "Dat Nguyen" <thucdat / hotmail.com> writes: > > > > |eval.rb fails to evaluate the 'until' loop: > > |ruby> i = 0 > > |ruby> until i >= 10 > > |ERR: (eval):1:in 'eval': compile error > > |(eval):1: parse error > > > > The newline terminates the statement, so that poor Ruby does not > > understand the relationship between `i = 0' and a `until' modifier. > > >Then there is a "dent" in the documentation: > >until > >Examples: > > until sunrise > sleep > end > >Syntax: > > until expr [do] > ... > end > >Executes body until condition expression returns true. > >which is quoted from ruby-man-1.4/syntax.html#until >I could not get it to work with do >ruby> i = 0 >0 >ruby> until i == 10 do >ERR: (eval):1: compile error >(eval):1: parse error >ruby> > > Hugh > hgs / dmu.ac.uk > > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com