diff --git a/ChangeLog b/ChangeLog index a2768a516f..e63d29b51a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Nov 29 17:19:26 2012 Eric Hodel + + * lib/tracer.rb: Updated to match removal of custom_require from + RubyGems. + * test/test_tracer.rb: ditto. Improved failure message if the test + fails + Thu Nov 29 17:15:00 2012 Zachary Scott * gc.c: Documentation for GC, GC::Profiler, ObjectSpace, and diff --git a/lib/tracer.rb b/lib/tracer.rb index 7bb0678cef..0ad8ce5538 100644 --- a/lib/tracer.rb +++ b/lib/tracer.rb @@ -289,7 +289,7 @@ if $0 == __FILE__ require $0 else # call Tracer.on only if required by -r command-line option - count = caller.count {|bt| /\/rubygems\/custom_require.rb:/ !~ bt} + count = caller.count {|bt| %r%/rubygems/core_ext/kernel_require\.rb:% !~ bt} if (defined?(Gem) and count == 0) or (!defined?(Gem) and count <= 1) Tracer.on diff --git a/test/test_tracer.rb b/test/test_tracer.rb index a1e0a4571c..918fed0446 100644 --- a/test/test_tracer.rb +++ b/test/test_tracer.rb @@ -9,11 +9,11 @@ class TestTracer < Test::Unit::TestCase assert_in_out_err(%w[-rtracer -e 1]) do |(*lines),| case lines.size when 2 - assert_match(%r{rubygems/custom_require\.rb:\d+:Kernel:<:}, lines[0]) + assert_match(%r{rubygems/core_ext/kernel_require\.rb:\d+:Kernel:<:}, lines[0]) when 1 # do nothing else - flunk "unexpected output from `ruby -rtracer -e 1`" + flunk "unexpected output from `ruby -rtracer -e 1`: #{lines.inspect}" end assert_equal "#0:-e:1::-: 1", lines.last end