From: Gary Wright Date: 2006-03-12T09:12:25+09:00 Subject: Re: unexpected behavior of range.each (Newbie extreme) On Mar 11, 2006, at 6:53 PM, Tim Hunter wrote: > It was done on purpose. Ranges want to be able to iterate from > beginning to end using the .succ method on the objects that the > range is constructed from. That's not possible for (9..5). Also, > the definition for .include? is range.start <= val <= range.end. > Not true for (9..5). There have been several threads over the last few months regarding the peculiarities of Ranges. The semantics seem a bit confused. Sometimes ranges behave like generated sequences of objects, sometimes they behave like intervals, and sometimes they just behave like a coordinate pair. The behavior also depends quite a bit on the objects used to construct the range. They are quite convenient in any number of situations but they have some rough edges. Is it worth trying to craft an RCR that smooths things out a bit? Gary Wright