From: daz Date: 2005-08-06T04:11:07+09:00 Subject: Re: algorithm help Ara.T.Howard wrote: > On Fri, 5 Aug 2005, Robert Klemme wrote: > > > Btw, here's another funny idea: > > [snip code] > > not bad (and *so* short), but failing for descending ranges [...] > Descending ranges don't have much method support in Ruby, though. rg = (43..41) p rg.include?(42) #-> false p rg.max #-> nil p rg.to_a #-> [] .... and others. daz