[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02073] Re: eval.rb fails

From: "Dat Nguyen" <thucdat@...>
Date: 2000-03-22 12:10:12 UTC
List: ruby-talk #2073
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

In This Thread

Prev Next