diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 00:51:04 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 00:51:04 +0000 |
commit | 8fadbe5f3e5e8b2d9f635a274b4121811313de84 (patch) | |
tree | 3dc303b2b09eb4c54d19e3c68172856d13d60e2b /lib/rubygems/basic_specification.rb | |
parent | c2dcb947aaf60421ca4035298059a029a0a24c26 (diff) | |
download | ruby-8fadbe5f3e5e8b2d9f635a274b4121811313de84.tar.gz |
* lib/rubygems: Update to RubyGems master ddac51f. Changes:
* Allow override for the shared gem installation directory for
rubygems packagers.
* Lock gem cache files for read and write to improve thread safety.
* Use io/console when available.
* Minor cleanup.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/basic_specification.rb')
-rw-r--r-- | lib/rubygems/basic_specification.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index 6cc13bb539..a52377ff22 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -72,9 +72,16 @@ class Gem::BasicSpecification # Returns full path to the directory where gem's extensions are installed. def extension_dir - @extension_dir ||= - File.join base_dir, 'extensions', Gem::Platform.local.to_s, - Gem.extension_api_version, full_name + @extension_dir ||= File.expand_path File.join(extensions_dir, full_name) + end + + ## + # Returns path to the extensions directory. + + def extensions_dir + @extensions_dir ||= Gem.default_ext_dir_for(base_dir) || + File.join(base_dir, 'extensions', Gem::Platform.local.to_s, + Gem.extension_api_version) end def find_full_gem_path # :nodoc: @@ -147,7 +154,9 @@ class Gem::BasicSpecification @loaded_from = path && path.to_s @extension_dir = nil + @extensions_dir = nil @full_gem_path = nil + @gem_dir = nil @gems_dir = nil @base_dir = nil end |