File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed
Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 55begin
66 require "rdoc/rubygems_hook"
77 module Gem
8- RDoc = ::RDoc ::RubygemsHook
9-
108 ##
119 # Returns whether RDoc defines its own install hooks through a RubyGems
1210 # plugin. This and whatever is guarded by it can be removed once no
@@ -15,8 +13,14 @@ module Gem
1513 def self . rdoc_hooks_defined_via_plugin?
1614 Gem ::Version . new ( ::RDoc ::VERSION ) >= Gem ::Version . new ( "6.9.0" )
1715 end
18- end
1916
20- Gem . done_installing ( &Gem ::RDoc . method ( :generation_hook ) ) unless Gem . rdoc_hooks_defined_via_plugin?
17+ if rdoc_hooks_defined_via_plugin?
18+ RDoc = ::RDoc ::RubyGemsHook
19+ else
20+ RDoc = ::RDoc ::RubygemsHook
21+
22+ Gem . done_installing ( &Gem ::RDoc . method ( :generation_hook ) )
23+ end
24+ end
2125rescue LoadError
2226end
Original file line number Diff line number Diff line change @@ -18,19 +18,7 @@ def setup
1818
1919 install_gem @a
2020
21- hook_class = if defined? ( RDoc ::RubyGemsHook )
22- RDoc ::RubyGemsHook
23- else
24- Gem ::RDoc
25- end
26-
27- @hook = hook_class . new @a
28-
29- begin
30- hook_class . load_rdoc
31- rescue Gem ::DocumentError => e
32- pend e . message
33- end
21+ @hook = Gem ::RDoc . new @a
3422
3523 Gem . configuration [ :rdoc ] = nil
3624 end
You can’t perform that action at this time.
0 commit comments