Skip to content

Commit 66510a0

Browse files
Merge pull request #8322 from rubygems/support-next-version-of-rdoc
Support new rdoc plugin
2 parents 80c1e7e + 167b713 commit 66510a0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/rubygems/test_gem_rdoc.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
require "rubygems/rdoc"
66

77
class TestGemRDoc < Gem::TestCase
8-
Gem::RDoc.load_rdoc
9-
108
def setup
119
super
1210

@@ -20,10 +18,16 @@ def setup
2018

2119
install_gem @a
2220

23-
@hook = Gem::RDoc.new @a
21+
hook_class = if defined?(RDoc::RubyGemsHook)
22+
RDoc::RubyGemsHook
23+
else
24+
Gem::RDoc
25+
end
26+
27+
@hook = hook_class.new @a
2428

2529
begin
26-
Gem::RDoc.load_rdoc
30+
hook_class.load_rdoc
2731
rescue Gem::DocumentError => e
2832
pend e.message
2933
end

0 commit comments

Comments
 (0)