summaryrefslogtreecommitdiff
path: root/lib/rubygems/rdoc.rb
blob: dfaf7c55bfb374a1a06ed160ffff1503b1137eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true
require 'rubygems'

begin
  gem 'rdoc'
rescue Gem::LoadError
  # swallow
else
  # This will force any deps that 'rdoc' might have
  # (such as json) that are ambiguous to be activated, which
  # is important because we end up using Specification.reset
  # and we don't want the warning it pops out.
  Gem.finish_resolve
end

begin
  require 'rdoc/rubygems_hook'
  module Gem
    RDoc = ::RDoc::RubygemsHook
  end
rescue LoadError
end

Gem.done_installing(&Gem::RDoc.method(:generation_hook))