Robert Dober wrote:
> Just another point which is troubling:
> 
> irb(main):025:0> ("Z".."AA") === "Z"
> => false
> irb(main):026:0> ("AA".."Z") === "Z"
> => true
> 
>  and
> 
> irb(main):030:0* ("AA".."Z") === "Z"
> => true
> irb(main):031:0> ("AA".."Z") === "AA"
> => true
> irb(main):035:0>  ("AA".."Z") === "AB"
> => trueirb(main):036:0> ("AA".."Z") === "A"*1764
> => true

I put together a short class to do LetterSeries.  It implements <=> and 
succ in a way that lets it act correctly in a range object.

http://www.sciwerks.com/blog/2006/05/28/ruby-series-az/

-- 
Posted via http://www.ruby-forum.com/.