diff options
| author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-31 22:27:35 +0000 |
|---|---|---|
| committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-31 22:27:35 +0000 |
| commit | cc804ab45ac86f21132cf4de886333671a1ecfad (patch) | |
| tree | f857a455a6627484a5e790eedee57cf8fcbdd22e /lib | |
| parent | 57fd5212bd81b50bd99af190fbef94844c23a50b (diff) | |
| download | ruby-cc804ab45ac86f21132cf4de886333671a1ecfad.tar.gz ruby-cc804ab45ac86f21132cf4de886333671a1ecfad.tar.xz ruby-cc804ab45ac86f21132cf4de886333671a1ecfad.zip | |
Don't require rubygems/defaults from gem_prelude.rb.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rubygems.rb | 1 | ||||
| -rw-r--r-- | lib/rubygems/defaults.rb | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index e85d97c00..9913b59ce 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -718,6 +718,7 @@ module Gem @gem_path.uniq! @gem_path.each do |path| if 0 == File.expand_path(path).index(Gem.user_home) + next unless File.directory? Gem.user_home unless win_platform? then # only create by matching user next if Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index 315d12a48..7884fad83 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb @@ -20,9 +20,12 @@ module Gem if defined? RUBY_FRAMEWORK_VERSION then File.join File.dirname(ConfigMap[:sitedir]), 'Gems', ConfigMap[:ruby_version] - else + elsif RUBY_VERSION > '1.9' then File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', ConfigMap[:ruby_version]) + else + File.join(ConfigMap[:libdir], ruby_engine, 'gems', + ConfigMap[:ruby_version]) end end |
