aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tracer.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-15 08:52:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-15 08:52:18 +0000
commit3196645aee3add70a33f3d926d1d6e3820d39377 (patch)
tree326561008f8512e3560810077a2505da6aa6d082 /lib/tracer.rb
parent826f10c6ce5cf11ba57f47f58384f4da58806c35 (diff)
downloadruby-3196645aee3add70a33f3d926d1d6e3820d39377.tar.gz
-r debug, -s, etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tracer.rb')
-rw-r--r--lib/tracer.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tracer.rb b/lib/tracer.rb
index a8dc2a104d..095173e53b 100644
--- a/lib/tracer.rb
+++ b/lib/tracer.rb
@@ -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