From: Robert Dober Date: 2008-11-30T19:26:19+09:00 Subject: Re: Enumerable#select used to return actual values On Sun, Nov 30, 2008 at 11:13 AM, David A. Black wrote: > There's also: > > res = [] > (1..10).each {|e| res << (e * e) if e > 5 } > res > > No shame in a local variable now and then :-) Not at all, and it is often the *fastest* solution as, unfortunately, #inject is slow. Robert