From: mortee Date: 2007-10-12T12:33:50+09:00 Subject: Re: range max Marek Kasperkiewicz wrote: > Morton Goldberg wrote: >> On Oct 11, 2007, at 9:30 PM, Marek Kasperkiewicz wrote: >> >>> If i try this >>> puts (1..10).max >>> it runs fine. >>> If i try this >>> puts (1..100000000).max >>> It is extremely slow. Instead of using straight math max= 100000000-1 >>> it uses some king of interator to find out the value of max. >>> What is the catch here? >> >> I'm afraid that's the way the Enumerable mixin works. >> ... > > thanks Morton, > I thought ruby supposed to be better than Perl and Python combined, but > I can see that's not the case yet. You think this has anything to do with the quality of the language?... mortee