Variation in behavior between directly calling a method and using method('name').call ?

View: New views
1 Messages — Rating Filter:   Alert me  

Variation in behavior between directly calling a method and using method('name').call ?

by Matt Jones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Given this example code:

http://gist.github.com/221585

(highly simplified from the real code, which involves  
ActiveSupport::Rescuable and some other magic)

Why does the second call (which is essentially what Rescuable does in  
2.3) fail? Adding a 'def foo; super; end' to class B makes it work,  
but I can't figure out why that's needed for only one of the two forms.

Any help is appreciated.

--Matt Jones


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