Hello,

You should put the range inside ().

(3..5).times { puts "yo" }

I think that rubi first evaluates 5.times { puts "yo" } before the range so 
the range is 3..(5.times {puts "yo"}) and so the error.

Bye

On Wed 27 Nov 2002 16:38, Daniel Berger wrote:
> Hi all,
>
> I got burned by this mistake:
>
> 3..5.times{ puts "yo" } -> what do you *think* this will do?
>
> Only the -w flag warns me that I might be doing something wrong here.
>
> The questions I have are:
>
> 1) Should 'times' be modified to support ranges?
> 2) If not, should it raise a NameError exception?
>
> Regards,
>
> Dan

-- 
Javier Fontan Muiņīs
jfontan / cesga.es
CESGA, Galicia Supercomputing Center