Project

General

Profile

Bug #13392 » tracepoint_bug.rb

areman01 (André Kullmann), 03/31/2017 08:26 PM

 
1
if RUBY_ENGINE == 'jruby'
2
  puts "#{RUBY_ENGINE}-#{JRUBY_VERSION} (ruby-#{RUBY_VERSION} java-#{java.lang.System.get_property('java.version')})"
3
else    
4
  puts "#{RUBY_ENGINE}-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})"
5
end  
6

    
7
require File.expand_path('../tracepoint_bug_ext.rb', __FILE__ ) 
8

    
9
TracePoint.new(:call,:return,:c_call,:c_return) do |trace_point|
10
  puts "#{trace_point.path}:#{trace_point.lineno} #{trace_point.event} #{trace_point.method_id}"
11
end.enable do  
12
  0.to_s
13
end