From: Rick DeNatale Date: 2008-03-30T22:34:19+09:00 Subject: Re: inject's pathological case... On 3/30/08, 7stud -- wrote: > By the way, using inject() is inefficient--not to mention confusing. > You might as well pretend it doesn't exist. Or much better, understand that it's a way to reduce/fold the elements of an enumerable into a single value. http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Enumerable#inject is very useful, as long as you don't treat it as Maslow's hammer and use it in inappropriate ways, such as giving it a block like in the original posting to this thread. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/