From 7e9eb32669348b7e0a5775c8e0fc9566be11fc31 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 21 Dec 2012 05:45:50 +0000 Subject: * lib/irb.rb, lib/irb/*: Documentation for IRB git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb/ext/tracer.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/irb/ext/tracer.rb') diff --git a/lib/irb/ext/tracer.rb b/lib/irb/ext/tracer.rb index 46a9d53a2e..8c9083dbad 100644 --- a/lib/irb/ext/tracer.rb +++ b/lib/irb/ext/tracer.rb @@ -23,9 +23,16 @@ module IRB end class Context + # Whether Tracer is used when evaluating statements in this context. + # + # See +lib/tracer.rb+ for more information. attr_reader :use_tracer alias use_tracer? use_tracer + # Sets whether or not to use the Tracer library when evaluating statements + # in this context. + # + # See +lib/tracer.rb+ for more information. def use_tracer=(opt) if opt Tracer.set_get_line_procs(@irb_path) { @@ -41,6 +48,10 @@ module IRB class WorkSpace alias __evaluate__ evaluate + # Evaluate the context of this workspace and use the Tracer library to + # output the exact lines of code are being executed in chronological order. + # + # See +lib/tracer.rb+ for more information. def evaluate(context, statements, file = nil, line = nil) if context.use_tracer? && file != nil && line != nil Tracer.on -- cgit v1.2.3