Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Closed
wants to merge 1 commit into from

3 participants

Jörg Schray Michal Fojtik Zachary Scott
Jörg Schray

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.

Zachary Scott
Collaborator

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

Zachary Scott zzak closed this November 18, 2012
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 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  lib/tracer.rb
12  lib/tracer.rb
@@ -205,12 +205,12 @@ def trace_func(event, file, line, id, binding, klass, *) # :nodoc:
205 205
         else
206 206
           source = get_line(file, line)
207 207
         end
208  
-        printf("%s:%d:%s:%s: %s",
209  
-               file,
210  
-               line,
211  
-               klass || '',
212  
-               EVENT_SYMBOL[event],
213  
-               source)
  208
+        stdout.printf("%s:%d:%s:%s: %s",
  209
+                      file,
  210
+                      line,
  211
+                      klass || '',
  212
+                      EVENT_SYMBOL[event],
  213
+                      source)
214 214
       end
215 215
     end
216 216
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.