mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/tracer.rb: Updated to match removal of custom_require from
RubyGems. * test/test_tracer.rb: ditto. Improved failure message if the test fails git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8baab38ad2
commit
88f5a4ff2d
3 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Thu Nov 29 17:19:26 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* 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 <zachary@zacharyscott.net>
|
Thu Nov 29 17:15:00 2012 Zachary Scott <zachary@zacharyscott.net>
|
||||||
|
|
||||||
* gc.c: Documentation for GC, GC::Profiler, ObjectSpace, and
|
* gc.c: Documentation for GC, GC::Profiler, ObjectSpace, and
|
||||||
|
|
|
@ -289,7 +289,7 @@ if $0 == __FILE__
|
||||||
require $0
|
require $0
|
||||||
else
|
else
|
||||||
# call Tracer.on only if required by -r command-line option
|
# 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
|
if (defined?(Gem) and count == 0) or
|
||||||
(!defined?(Gem) and count <= 1)
|
(!defined?(Gem) and count <= 1)
|
||||||
Tracer.on
|
Tracer.on
|
||||||
|
|
|
@ -9,11 +9,11 @@ class TestTracer < Test::Unit::TestCase
|
||||||
assert_in_out_err(%w[-rtracer -e 1]) do |(*lines),|
|
assert_in_out_err(%w[-rtracer -e 1]) do |(*lines),|
|
||||||
case lines.size
|
case lines.size
|
||||||
when 2
|
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
|
when 1
|
||||||
# do nothing
|
# do nothing
|
||||||
else
|
else
|
||||||
flunk "unexpected output from `ruby -rtracer -e 1`"
|
flunk "unexpected output from `ruby -rtracer -e 1`: #{lines.inspect}"
|
||||||
end
|
end
|
||||||
assert_equal "#0:-e:1::-: 1", lines.last
|
assert_equal "#0:-e:1::-: 1", lines.last
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue