returning(...) ?
Duane Johnson
canadaduane at gmail.com
Tue Sep 4 16:57:20 EDT 2007
On Sep 4, 2007, at 2:46 PM, Brian Candler wrote:
> The following construct is an ActiveSupport-ism:
>
> returning(Foo.new) do |foo|
> ...
> end
>
> I don't especially like it, since it's both more verbose and less
> efficient
> than the direct alternative:
>
> foo = Foo.new
> ...
> foo
>
I think it should go too. It doesn't add much for readability (even
though it removes one repeated noun) and seems quite a bit slower.
Duane Johnson
(canadaduane)
More information about the Merb-devel
mailing list