summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 05:13:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 05:13:09 +0000
commitd7500edcf7b5226adf10406b7ecde11b5809d153 (patch)
treee79f9e971b0860cc1234c59300f0640fc4d772d6 /lib
parentfc788eaa37994ca914e65add2d2f4c9577c80611 (diff)
downloadruby-d7500edcf7b5226adf10406b7ecde11b5809d153.tar.gz
ruby-d7500edcf7b5226adf10406b7ecde11b5809d153.tar.xz
ruby-d7500edcf7b5226adf10406b7ecde11b5809d153.zip
* lib/rubygems.rb: Kernel#gem is already defined, and workaround
for home directory and custom_require are no longer needed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 06ea950c6..8ae4243e6 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -35,6 +35,8 @@ module Gem
end
module Kernel
+ # defined in gem_prelude.rb
+ undef gem
##
# Use Kernel#gem to activate a specific version of +gem_name+.
@@ -534,26 +536,8 @@ module Gem
##
# Finds the user's home directory.
- #--
- # Some comments from the ruby-talk list regarding finding the home
- # directory:
- #
- # I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems
- # to be depending on HOME in those code samples. I propose that
- # it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at
- # least on Win32).
def self.find_home
- unless RUBY_VERSION > '1.9' then
- ['HOME', 'USERPROFILE'].each do |homekey|
- return ENV[homekey] if ENV[homekey]
- end
-
- if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] then
- return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}"
- end
- end
-
File.expand_path "~"
rescue
if File::ALT_SEPARATOR then
@@ -1104,10 +1088,6 @@ end
require 'rubygems/config_file'
-if RUBY_VERSION < '1.9' then
- require 'rubygems/custom_require'
-end
-
Gem.clear_paths
plugins = Gem.find_files 'rubygems_plugin'