On Tuesday 05 October 2004 01:25 am, Markus wrote:
> Typically, the versions of ruby I produce in these experiments are
> killed by angry villages before they can show their essential
> kindheartedness.  But I still hope.

I occurs to me that the angry villagers might be confused. The example of the 
never ending

  (0..(10.0/0)).member?(4)

comes to mind. Why would this be an infinite loop? It must be trying to 
generate the list before looking to see if 4 is in it (?) Are these ranges 
that stupid? Even so, if it used succ to test this then it would take a while 
to find out:

time ruby -e '(0..1000000000).member?(999999999)'

real    7m10.971s
user    6m56.150s
sys     0m0.617s

Yuk. But there is nothing one can do about it as long as one depends on #succ. 
I suppose it's awfully clever and OOP and all to have any object supporting 
<=> and succ work with ranges, but I wonder how much use they get outside of 
numbers and occasional character ranges. In other words perhaps succ isn;t 
the way to go (or perhaps a fallback) and a simple increment/decrement in the 
Range itself would be more usable --then the above 7 minutes would be about 7 
milliseconds.

T.