![]() | trace_calls.rb (P. 405) |
|
01 Oct 2009, 17:35
Robert Winter (5 posts) |
All, I’m trying to use the trace_calls.rb module on the boot.rb file of Rails (Rails 2.3.4 on Ruby 1.8.7) in order to understand the startup of rails. I have some questions and observations: - I added - I added include TraceCalls statements as follows (reproducing a small portion of boot.rb for reference for below questions):
The first two includes do not work. The last two includes do work. Trying to understand why has led me to wish for a chart comparing and contrasting the different ways of creating classes, methods, instance variables, and class variables. Perhaps I’ll build it. Does the above non-working code have anything to do with ‘instance methods’ versus ‘module methods’? Anyone have a clue why the trace_calls module isn’t working in the top part of boot.rb? - Is the final statement - My last comment is a ‘wish list’ item. Is it possible for the trace_calls module to figure out when a method being invoked is from an ancestor of the current object? In the above code, since I’ve put rails in the vendor directory, from the Thanks, |
|
01 Oct 2009, 20:06
Robert Winter (5 posts) |
I’ve managed to figure that it’s related to the ‘singleton_method_added’ callback. Trace_calls.rb does not define that callback. But I’m not sure how to fix it – my first several attempts have not worked. |
| You must be logged in to comment |

