From: Yukihiro Matsumoto Date: 2004-10-20T15:06:35+09:00 Subject: trace_func parameters (Re: ruby-dev summary 24298-24353) Hi, In message "Re: ruby-dev summary 24298-24353" on Wed, 20 Oct 2004 11:11:42 +0900, "trans. (T. Onoma)" writes: |I don't understand why it doesn't return the class of the outer scope --and |it's binding too. In this case it would be TOPLEVEL_BINDING and class Object, |I believe. trace_func receives 6 parameters: event: type of event which calls trace_func file: file name of the place of event line: line number of the place of event method: name of the method surrounding the place of event binding: binding at the place of event (if any) klass: class that defines calling method (for call event), or false value if event happened outside of any method This in the current behavior, "method" and "klass" parameters are left blank for the "end" event, caused by class/module statement outside of methods. Do you want to change these? For any reason? The "binding" parameter is bit more complicated. The "end" events are caused just in the middle of scope transitions (class scope to outer scope), so that I had hard time to determine which binding to return. Besides that, all know usage of "end" event do not require any information other than the event position, I haven't been motivated much to change the behavior, making interpreter more complex. matz.