From: Yukihiro Matsumoto Date: 2008-12-01T08:24:14+09:00 Subject: Re: Enumerable#select used to return actual values Hi, In message "Re: Enumerable#select used to return actual values" on Sun, 30 Nov 2008 19:47:13 +0900, "David A. Black" writes: |(0..10).each_with_object([]) {|e,a| a << (e * e) if e > 5 } | |Basically inject with a sticky accumulator. #each_with_object is an interesting concept. Maybe we can add it to the Enumerable if we can come up with a better name. matz.