Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for using Kernel.printf for tracing output instead of stdout.printf #111

Closed
wants to merge 1 commit into from

3 participants

@joergschray

The patch fixes a simple omission:
Tracer allows setting of the attribute 'stdout', but the method 'trace_func' does not respect it in the main output. - The optional output of process id and thread id respects the attribute.

BTW: The info on http://www.ruby-lang.org/en/community/ruby-core about how to submit patches via github seems outdated!? @shyouhei's fork of this repo is way behind... That's why I am sending this request to this repo.

@zzak
Collaborator

Closing this, please refer to Bug #6490 on redmine.

@zzak zzak closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/tracer.rb
View
12 lib/tracer.rb
@@ -205,12 +205,12 @@ def trace_func(event, file, line, id, binding, klass, *) # :nodoc:
else
source = get_line(file, line)
end
- printf("%s:%d:%s:%s: %s",
- file,
- line,
- klass || '',
- EVENT_SYMBOL[event],
- source)
+ stdout.printf("%s:%d:%s:%s: %s",
+ file,
+ line,
+ klass || '',
+ EVENT_SYMBOL[event],
+ source)
end
end
Something went wrong with that request. Please try again.