From: Ryan Davis Date: 2006-11-17T01:56:56+09:00 Subject: Re: #returning and #tap On Nov 16, 2006, at 10:46 AM, Louis J Scoras wrote: > Ugly. Sorry, it just is. It is much more readable to use returning. > > def foo(a) > returning [] do |b| > a.each do |x| > b << x > end > end > end I realize this is a contrived example on your part, but you did choose it and were trying to make a relevant point. That said, I have yet to see an example of returning used in a non-contrived way. def foo(a) a.map { |x| x } end More readable, faster, better... once again returning is used in a completely useless way...