On Thu, 01 Jul 1999, Julian R Fondren wrote:
>> - Range::new(1, 9, -2) -- ERROR!
>Perhaps you should try the latest version of ruby, the absolute value of
>the third argument is used, and this works fine.

But this is a bool value (0 means false; other mean true)! It decides
whether the range is inclusive or exclusive.

>
>> The call "Range::new(1, 9)" or "Range::new(9, 1)" could also be
>> written as "1..9" and "9..1" (perhaps we could have a global function
>> "range" (like Python) which would instantiate Ranges via Range::new?).

>This is already true.
>``for x in 1..9; print "#{x}\n"; end'' works as expected
>

Sorry, but the problem is not

  for x in 1..9; print "#{x}\n"; end

but

  for x in 9..1; print "#{x}\n"; end

[...]

>I think that the features you have here (that do not already exist =)
>could be useful; it seems as if you want to make Range objects look more
>like lists without them actually being so.

No, no, no. I want to have Range objects, as they would calculate its
members on a certain position, instead of really generate a list. The
difference would be like "range" and "xrange" in Python!

Cle.