diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-07 01:19:28 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-07 01:19:28 +0000 |
commit | d5e810dbd24cb92dc86d2d5b048f239315b15ba8 (patch) | |
tree | 0656ac1f6abe26dd1f1349f25ece23a534b1a0dc /lib/rubygems.rb | |
parent | 738b8872ef871cbfd78730142049cd1fe94a95fa (diff) | |
download | ruby-d5e810dbd24cb92dc86d2d5b048f239315b15ba8.tar.gz |
* ChangeLog:
* lib/rubygems/basic_specification.rb (class Gem):
* lib/rubygems/commands/contents_command.rb (prefix or only the files that are requir):
* lib/rubygems/commands/install_command.rb (to write the specification by hand):
* lib/rubygems/commands/setup_command.rb (class Gem):
* lib/rubygems/commands/setup_command.rb (TEXT):
* lib/rubygems/compatibility.rb (module Gem):
* lib/rubygems/defaults.rb (module Gem):
* lib/rubygems/deprecate.rb (module Gem):
* lib/rubygems/installer.rb (class Gem):
* lib/rubygems/platform.rb (class Gem):
* lib/rubygems/rdoc.rb (class Gem):
* lib/rubygems/request_set/lockfile.rb (class Gem):
* lib/rubygems/resolver/installer_set.rb (class Gem):
* lib/rubygems/resolver.rb (class Gem):
* lib/rubygems/specification.rb (class Gem):
* lib/rubygems/test_case.rb (class Gem):
* lib/rubygems/test_case.rb (Also):
* lib/rubygems/uninstaller.rb (class Gem):
* lib/rubygems.rb (module Gem):
* test/rubygems/test_gem.rb (class TestGem):
* test/rubygems/test_gem_commands_contents_command.rb (lib):
* test/rubygems/test_gem_commands_environment_command.rb (class TestGemCommandsEnvironmentCommand):
* test/rubygems/test_gem_commands_install_command.rb (ERROR):
* test/rubygems/test_gem_commands_update_command.rb (class TestGemCommandsUpdateCommand):
* test/rubygems/test_gem_dependency_installer.rb (class TestGemDependencyInstaller):
* test/rubygems/test_gem_installer.rb (load Gem):
* test/rubygems/test_gem_installer.rb (gem):
* test/rubygems/test_gem_request_set_lockfile.rb (GEM):
* test/rubygems/test_gem_request_set_lockfile.rb (DEPENDENCIES):
* test/rubygems/test_gem_specification.rb (dependencies):
* test/rubygems/test_gem_specification.rb (duplicate dependency on b):
* test/rubygems/test_gem_uninstaller.rb (class TestGemUninstaller):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 73c4846f82..7afc85bda5 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -8,7 +8,7 @@ require 'rbconfig' module Gem - VERSION = '2.2.0' + VERSION = '2.2.1' end # Must be first since it unloads the prelude from 1.9.2 @@ -572,7 +572,7 @@ module Gem # gem's paths are inserted before site lib directory by default. def self.load_path_insert_index - index = $LOAD_PATH.index ConfigMap[:sitelibdir] + index = $LOAD_PATH.index RbConfig::CONFIG['sitelibdir'] index end @@ -743,8 +743,8 @@ module Gem def self.prefix prefix = File.dirname RUBYGEMS_DIR - if prefix != File.expand_path(ConfigMap[:sitelibdir]) and - prefix != File.expand_path(ConfigMap[:libdir]) and + if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and + prefix != File.expand_path(RbConfig::CONFIG['libdir']) and 'lib' == File.basename(RUBYGEMS_DIR) then prefix end @@ -765,6 +765,10 @@ module Gem f.flock(File::LOCK_EX) f.read end + rescue Errno::EACCES + open path, 'rb' do |f| + f.read + end end ## @@ -772,8 +776,8 @@ module Gem def self.ruby if @ruby.nil? then - @ruby = File.join(ConfigMap[:bindir], - "#{ConfigMap[:ruby_install_name]}#{ConfigMap[:EXEEXT]}") + @ruby = File.join(RbConfig::CONFIG['bindir'], + "#{RbConfig::CONFIG['ruby_install_name']}#{RbConfig::CONFIG['EXEEXT']}") @ruby = "\"#{@ruby}\"" if @ruby =~ /\s/ end @@ -785,8 +789,7 @@ module Gem # Returns a String containing the API compatibility version of Ruby def self.ruby_api_version - @ruby_api_version ||= - "#{ConfigMap[:MAJOR]}.#{ConfigMap[:MINOR]}.#{ConfigMap[:TEENY]}" + @ruby_api_version ||= RbConfig::CONFIG['ruby_version'].dup end ## |