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

-r debug, -s, etc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-10-15 08:52:18 +00:00
parent 826f10c6ce
commit 3196645aee
12 changed files with 259 additions and 166 deletions

View file

@ -40,7 +40,6 @@ class Tracer
end
@get_line_procs = {}
@sources = {}
@filters = []
end
@ -79,17 +78,17 @@ class Tracer
return p.call line
end
unless list = @sources[file]
unless list = LINES__[file]
# print file if $DEBUG
begin
f = open(file)
begin
@sources[file] = list = f.readlines
LINES__[file] = list = f.readlines
ensure
f.close
end
rescue
@sources[file] = list = []
LINES__[file] = list = []
end
end
if l = list[line - 1]
@ -148,6 +147,8 @@ class Tracer
end
LINES__ = {} unless defined? LINES__
if caller(0).size == 1
if $0 == Tracer::MY_FILE_NAME
# direct call