3 Make sure to setup under DESTDIR.
5 --- lib/rubygems/commands/setup_command.rb.orig 2011-08-05 20:18:14.000000000 +0000
6 +++ lib/rubygems/commands/setup_command.rb
7 @@ -110,7 +110,7 @@ By default, this RubyGems will install g
9 uninstall_old_gemcutter
12 + install_rdoc install_destdir
16 @@ -221,16 +221,20 @@ TEXT
21 + def install_rdoc(install_destdir)
22 gem_doc_dir = File.join Gem.dir, 'doc'
23 rubygems_name = "rubygems-#{Gem::VERSION}"
24 rubygems_doc_dir = File.join gem_doc_dir, rubygems_name
26 + unless install_destdir.empty?
27 + FileUtils.mkdir_p gem_doc_dir unless File.exist?(gem_doc_dir)
30 if File.writable? gem_doc_dir and
31 (not File.exist? rubygems_doc_dir or
32 File.writable? rubygems_doc_dir) then
33 say "Removing old RubyGems RDoc and ri" if @verbose
34 - Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
35 + Dir[File.join(gem_doc_dir, 'rubygems-[0-9]*')].each do |dir|