Hi --

On Tue, 30 Jan 2007, Jason Mayer wrote:

> Ranges can be constructed using objects of any type, as long as the objects
> can be compared using their <=> operator and they support the succ method to
> return the next object in sequence.

That's actually not a necessary condition -- you can have a range of
floats too.  A range is fundamentally a kind of boolean test filter
for inclusion, and only secondarily a sort of ersatz array.  I tend to
think too much is sometimes expected of ranges in the latter role.


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)