Looking through the rails core code, I see method_missing performed like
this a lot:

  def method_missing(method, *args)
    if block_given?
      current_status.send(method, *args)  { |*block_args|
yield(*block_args) }
    else
      current_status.send(method, *args)
    end
  end

Why not just write:

  def method_missing(method, *args, &block)
    current_status.send(method, *args, &block)
  end

It the above implementation much faster or do they perform differently?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to