From 0d672c18cfbe960a6368cf61256ff6096f9589b3 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 30 Nov 2012 06:15:59 +0000 Subject: * vm_trace.c (set_trace_func): Formatting of params and events git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_trace.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'vm_trace.c') diff --git a/vm_trace.c b/vm_trace.c index d94e9df8e0..a511b103f6 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -369,17 +369,31 @@ static void call_trace_func(rb_event_flag_t, VALUE data, VALUE self, ID id, VALU * set_trace_func(nil) -> nil * * Establishes _proc_ as the handler for tracing, or disables - * tracing if the parameter is +nil+. _proc_ takes up - * to six parameters: an event name, a filename, a line number, an - * object id, a binding, and the name of a class. _proc_ is - * invoked whenever an event occurs. Events are: c-call - * (call a C-language routine), c-return (return from a - * C-language routine), call (call a Ruby method), - * class (start a class or module definition), - * end (finish a class or module definition), - * line (execute code on a new line), raise - * (raise an exception), and return (return from a Ruby - * method). Tracing is disabled within the context of _proc_. + * tracing if the parameter is +nil+. + * + * _proc_ takes up to six parameters: + * + * * an event name + * * a filename + * * a line number + * * an object id + * * a binding + * * the name of a class + * + * _proc_ is invoked whenever an event occurs. + * + * Events are: + * + * +c-call+:: call a C-language routine + * +c-return+:: return from a C-language routine + * +call+:: call a Ruby method + * +class+:: start a class or module definition), + * +end+:: finish a class or module definition), + * +line+:: execute code on a new line + * +raise+:: raise an exception + * +return+:: return from a Ruby method + * + * Tracing is disabled within the context of _proc_. * * class Test * def test -- cgit v1.2.3