End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Commands::SetupCommand#install_rdoc
install_rdoc
lib/rubygems/commands/setup_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/commands/setup_command.rb, line 321
def install_rdoc
gem_doc_dir = File.join Gem.dir, 'doc'
rubygems_name = "rubygems-#{Gem::VERSION}"
rubygems_doc_dir = File.join gem_doc_dir, rubygems_name
begin
Gem.ensure_gem_subdirectories Gem.dir
rescue SystemCallError
# ignore
end
if File.writable? gem_doc_dir and
(not File.exist? rubygems_doc_dir or
File.writable? rubygems_doc_dir)
say "Removing old RubyGems RDoc and ri" if @verbose
Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
rm_rf dir
end
require_relative '../rdoc'
fake_spec = Gem::Specification.new 'rubygems', Gem::VERSION
def fake_spec.full_gem_path
File.expand_path '../../../..', __FILE__
end
generate_ri = options[:document].include? 'ri'
generate_rdoc = options[:document].include? 'rdoc'
rdoc = Gem::RDoc.new fake_spec, generate_rdoc, generate_ri
rdoc.generate
return true
elsif @verbose
say "Skipping RDoc generation, #{gem_doc_dir} not writable"
say "Set the GEM_HOME environment variable if you want RDoc generated"
end
return false
end
No documentation available
See also
#install_lib
#make_destination_dirs
#install_file_list
#prepend_destdir_if_present
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1