--- lib/rubygems/commands/setup_command.rb.orig	2010-04-20 16:47:36.000000000 +1000
+++ lib/rubygems/commands/setup_command.rb	2012-11-02 20:34:53.000000000 +1100
@@ -230,7 +230,7 @@
   end
 
   def install_rdoc
-    gem_doc_dir = File.join Gem.dir, 'doc'
+    gem_doc_dir = File.join options[:destdir], Gem.dir, 'doc'
     rubygems_name = "rubygems-#{Gem::VERSION}"
     rubygems_doc_dir = File.join gem_doc_dir, rubygems_name
 
@@ -270,20 +270,8 @@
       lib_dir = Gem::ConfigMap[site_or_vendor]
       bin_dir = Gem::ConfigMap[:bindir]
     else
-      # Apple installed RubyGems into libdir, and RubyGems <= 1.1.0 gets
-      # confused about installation location, so switch back to
-      # sitelibdir/vendorlibdir.
-      if defined?(APPLE_GEM_HOME) and
-        # just in case Apple and RubyGems don't get this patched up proper.
-        (prefix == Gem::ConfigMap[:libdir] or
-         # this one is important
-         prefix == File.join(Gem::ConfigMap[:libdir], 'ruby')) then
          lib_dir = Gem::ConfigMap[site_or_vendor]
          bin_dir = Gem::ConfigMap[:bindir]
-      else
-        lib_dir = File.join prefix, 'lib'
-        bin_dir = File.join prefix, 'bin'
-      end
     end
 
     unless install_destdir.empty? then