TracePoint

ruby/spec describes 19 methods in core/tracepoint, and Metorex implements 19 of them. The parameters are what Method#parameters answers under Metorex.

  • TracePoint.allow_reentry: implemented, parameters []. Generally, while a TracePoint callback is running, other registered callbacks are not called to avoid confusion from reentrance.
  • TracePoint#binding: implemented, parameters []. Returns the generated binding object from the event. An example calling it.
  • TracePoint#callee_id: implemented, parameters []. Returns the called name of the method being called.
  • TracePoint#defined_class: implemented, parameters []. Returns the class or module of the method being called. An example calling it.
  • TracePoint#disable: implemented, parameters [[:block, :block]]. Deactivates the trace. An example calling it.
  • TracePoint#enable: implemented, parameters [[:key, :target], [:key, :target_line], [:key, :target_thread], [:block, :block]]. Activates the trace. An example calling it.
  • TracePoint#enabled?: implemented, parameters []. Returns the current status of the trace. An example calling it.
  • TracePoint#eval_script: implemented, parameters []. Returns the compiled source code (String) from eval methods on the :script_compiled event. An example calling it.
  • TracePoint#event: implemented, parameters []. Returns the type of event. An example calling it.
  • TracePoint#inspect: implemented, parameters []. Returns a string containing a human-readable TracePoint status. An example calling it.
  • TracePoint#lineno: implemented, parameters []. Returns the line number of the event. An example calling it.
  • TracePoint#method_id: implemented, parameters []. Returns the name at the definition of the method being called. An example calling it.
  • TracePoint.new: implemented, parameters [[:rest, :events], [:block, :block]]. Returns a new TracePoint object, not enabled by default. An example calling it.
  • TracePoint#parameters: implemented, parameters []. Returns the parameter definitions of the method or block that the current hook belongs to. An example calling it.
  • TracePoint#path: implemented, parameters []. Returns the path of the file being executed. An example calling it.
  • TracePoint#raised_exception: implemented, parameters []. Returns the exception raised on the :raise event or rescued on the :rescue event. An example calling it.
  • TracePoint#return_value: implemented, parameters []. Returns the return value from :return, :c_return, and :b_return events.
  • TracePoint#self: implemented, parameters []. Returns the trace object during the event.
  • TracePoint.trace: implemented, parameters [[:rest, :events], [:block, :block]]. A convenience method for TracePoint.new that activates the trace automatically.

The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.