summaryrefslogtreecommitdiff
path: root/lib/tracer.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
commit7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch)
tree0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/tracer.rb
parent34276148c4450faa77bb298cfbe005f7c263f802 (diff)
* lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tracer.rb')
-rw-r--r--lib/tracer.rb44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/tracer.rb b/lib/tracer.rb
index 494de08..a9e5d25 100644
--- a/lib/tracer.rb
+++ b/lib/tracer.rb
@@ -130,9 +130,9 @@ class Tracer
if block_given?
on
begin
- yield
+ yield
ensure
- off
+ off
end
else
set_trace_func method(:trace_func).to_proc
@@ -160,14 +160,14 @@ class Tracer
unless list = SCRIPT_LINES__[file]
begin
- f = File::open(file)
- begin
- SCRIPT_LINES__[file] = list = f.readlines
- ensure
- f.close
- end
+ f = File::open(file)
+ begin
+ SCRIPT_LINES__[file] = list = f.readlines
+ ensure
+ f.close
+ end
rescue
- SCRIPT_LINES__[file] = list = []
+ SCRIPT_LINES__[file] = list = []
end
end
@@ -198,19 +198,19 @@ class Tracer
Tracer::stdout_mutex.synchronize do
if EVENT_SYMBOL[event]
- stdout.printf("<%d>", $$) if Tracer::display_process_id?
- stdout.printf("#%d:", get_thread_no) if Tracer::display_thread_id?
- if line == 0
- source = "?\n"
- else
- source = get_line(file, line)
- end
- printf("%s:%d:%s:%s: %s",
- file,
- line,
- klass || '',
- EVENT_SYMBOL[event],
- source)
+ stdout.printf("<%d>", $$) if Tracer::display_process_id?
+ stdout.printf("#%d:", get_thread_no) if Tracer::display_thread_id?
+ if line == 0
+ source = "?\n"
+ else
+ source = get_line(file, line)
+ end
+ printf("%s:%d:%s:%s: %s",
+ file,
+ line,
+ klass || '',
+ EVENT_SYMBOL[event],
+ source)
end
end