From: Robert Feldt Date: 2001-06-17T01:51:40+09:00 Subject: [ruby-talk:16540] Trapping method defs Hi all, Is there some simple way to be notified (with method and class ids) each time a method is defined? I've managed to do it (by installing Object.method_added and then finding the class by other and bulkier means) but I have to reconstitute the relevant info from different sources and it doesn't work for methods added in C. If there is no simple way shouldn't we add the klass id to method_added: method_added(methodId, klassId) ? RCR? Or one can easily get it from 'caller' as in my previously proposed call_stack RCR... Comments/Ideas/Opinions? I sure hope this is already supported in some way I've missed... /Robert