Actions
Bug #3843
closedruby -r tracer prog.rb no longer tracers prog.rb
Description
=begin
The problem appears to be at the end of tracer.rb:
if $0 == FILE
direct call¶
$0 = ARGV[0]
ARGV.shift
Tracer.on
require $0
elsif caller.size <= 1
Tracer.on
end
IN 1.9.2, caller() at this point is 2 deep:
["internal:lib/rubygems/custom_require:29:in require'", "<internal:lib/rubygems/custom_require>:29:in
require'"]
The following change seems to fix it, but it feels a little hacky..
if $0 == FILE
direct call¶
$0 = ARGV[0]
ARGV.shift
Tracer.on
require $0
elsif caller.size <= 2 && caller.all? {|place| place =~ /custom_require/}
Tracer.on
end
Dave
=end
Updated by nobu (Nobuyoshi Nakada) about 14 years ago
- Status changed from Open to Closed
=begin
This issue was solved with changeset r29280.
Roger, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Actions
Like0
Like0