"Mauricio FernŠŌdez" wrote
> What about this?
>
>
> batsman@kodos:~/src/rubylang$ cat myrange.rb
>
>
> class Range
>  def each
> if (first <=> last) == -1
> # proceed in normal order
> a = first
> while ( a != last )


Better use * while ( a < last )  * or you
will get an inifinite loop if the range is
built with floats like (1 .. 5.7)