From: Piergiuliano Bossi Date: 2004-03-04T23:44:45+09:00 Subject: Re: Ruby won, of course Robert Klemme wrote: >>>+ #inject is even more performant since you omit the intermediate > > array of > >>>results. >> >>Yes, even if the combine_results method performs all the check anyway, >>while inject appears to stop as soon as a false value is reached. Not a >>big issue, in any case. > > > inject doesn't stop prematurely unless you include a break or return > (which you didn't): You are right, my fault. Fact is that having eliminated combine_results method I now combine values using '&&' (or 'and'), which in turn performs a short-circuit evaluation ==> if the failing test is in the first group combined through '&&' the second group will never be evaluated. I start thinking that combine_results cannot be avoided... Thanks again. Ciao, Giuliano -- If you want to send me an email in the address you have to write 'p', then a dot, followed by 'bossi' at 'quinary', another dot and 'com' at last