1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* {ext,lib,test}/**/*.rb: removed trailing spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-03-06 03:56:38 +00:00
parent 9b52ae2e64
commit 287a34ae0d
856 changed files with 13989 additions and 13989 deletions

View file

@ -1,12 +1,12 @@
#
# tracer.rb -
# tracer.rb -
# $Release Version: 0.2$
# $Revision: 1.8 $
# by Keiju ISHITSUKA(Nippon Rational Inc.)
#
# --
#
#
#
#
#
@ -22,7 +22,7 @@ class Tracer
alias verbose? verbose
attr_accessor :stdout
end
EVENT_SYMBOL = {
"line" => "-",
"call" => ">",
@ -32,7 +32,7 @@ class Tracer
"c-call" => ">",
"c-return" => "<",
}
def initialize
@threads = Hash.new
if defined? Thread.main
@ -45,7 +45,7 @@ class Tracer
@filters = []
end
def stdout
Tracer.stdout
end
@ -63,7 +63,7 @@ class Tracer
stdout.print "Trace on\n" if Tracer.verbose?
end
end
def off
set_trace_func nil
stdout.print "Trace off\n" if Tracer.verbose?
@ -76,7 +76,7 @@ class Tracer
def set_get_line_procs(file, p = proc)
@get_line_procs[file] = p
end
def get_line(file, line)
if p = @get_line_procs[file]
return p.call(line)
@ -85,7 +85,7 @@ class Tracer
unless list = SCRIPT_LINES__[file]
begin
f = open(file)
begin
begin
SCRIPT_LINES__[file] = list = f.readlines
ensure
f.close
@ -101,7 +101,7 @@ class Tracer
"-\n"
end
end
def get_thread_no
if no = @threads[Thread.current.object_id]
no
@ -109,14 +109,14 @@ class Tracer
@threads[Thread.current.object_id] = @threads.size
end
end
def trace_func(event, file, line, id, binding, klass, *)
return if file == __FILE__
for p in @filters
return unless p.call event, file, line, id, binding, klass
end
# saved_crit = Thread.critical
# Thread.critical = true
stdout.printf("#%d:%s:%d:%s:%s: %s",
@ -137,11 +137,11 @@ class Tracer
Single.on
end
end
def Tracer.off
Single.off
end
def Tracer.set_get_line_procs(file_name, p = proc)
Single.set_get_line_procs(file_name, p)
end
@ -149,14 +149,14 @@ class Tracer
def Tracer.add_filter(p = proc)
Single.add_filter(p)
end
end
SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__
if $0 == __FILE__
# direct call
$0 = ARGV[0]
ARGV.shift
Tracer.on