Here's why it's not there:

class Foo
  def foo
    :foo
  end
end

@foos = [Foo.new] * 1_000_000

@foos.each(&:foo) vs @foos.each{|f| f.foo}


                    user           system      total            real
sym 2 proc  2.000000   0.020000   2.020000 (  2.093694)
raw ruby      0.330000   0.000000   0.330000 (  0.345703)

Cheers
Daniel


On Mon, Feb 2, 2009 at 9:57 AM, jonuts <[email protected]> wrote:

>
> D> run ruby 1.8.7
>
> On Feb 2, 12:45 am, Phlip <[email protected]> wrote:
> > Merbalists:
> >
> > If I feel like using posts.map(&:name), leveraging the cute
> Symbol#to_proc trick
> > from both Rails and 'facets', what's the _most_supportable_ way to get
> it?
> >
> >   A> stick all three lines at the bottom of config/init.rb?
> >   B> require 'facets'?
> >   C> require someone's merb-cute-hacks module from GitHub?
> >
> > BTW, please debate whether Symbol#to_proc is better than sex, or the last
> bell
> > before the Apocalypse, in space provided: [___]. Please write legibly...
> >
> > --
> >    Phlip
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to