summaryrefslogtreecommitdiff
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-01 08:19:06 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-01 08:19:06 +0000
commit8f87be4e22e61ca92c856ef977d0f6924974bdcf (patch)
tree1ed8dd47e10d06bd93c97206943e8bf3731adc0f /lib/rubygems.rb
parent3efb494a213df6393a6f9aa83297e06bd68faa5e (diff)
Revert r44778 #9375
It breaks test-all if all tests are in a single process git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 7afc85bda5..73c4846f82 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -8,7 +8,7 @@
require 'rbconfig'
module Gem
- VERSION = '2.2.1'
+ VERSION = '2.2.0'
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 RbConfig::CONFIG['sitelibdir']
+ index = $LOAD_PATH.index ConfigMap[:sitelibdir]
index
end
@@ -743,8 +743,8 @@ module Gem
def self.prefix
prefix = File.dirname RUBYGEMS_DIR
- if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and
- prefix != File.expand_path(RbConfig::CONFIG['libdir']) and
+ if prefix != File.expand_path(ConfigMap[:sitelibdir]) and
+ prefix != File.expand_path(ConfigMap[:libdir]) and
'lib' == File.basename(RUBYGEMS_DIR) then
prefix
end
@@ -765,10 +765,6 @@ module Gem
f.flock(File::LOCK_EX)
f.read
end
- rescue Errno::EACCES
- open path, 'rb' do |f|
- f.read
- end
end
##
@@ -776,8 +772,8 @@ module Gem
def self.ruby
if @ruby.nil? then
- @ruby = File.join(RbConfig::CONFIG['bindir'],
- "#{RbConfig::CONFIG['ruby_install_name']}#{RbConfig::CONFIG['EXEEXT']}")
+ @ruby = File.join(ConfigMap[:bindir],
+ "#{ConfigMap[:ruby_install_name]}#{ConfigMap[:EXEEXT]}")
@ruby = "\"#{@ruby}\"" if @ruby =~ /\s/
end
@@ -789,7 +785,8 @@ module Gem
# Returns a String containing the API compatibility version of Ruby
def self.ruby_api_version
- @ruby_api_version ||= RbConfig::CONFIG['ruby_version'].dup
+ @ruby_api_version ||=
+ "#{ConfigMap[:MAJOR]}.#{ConfigMap[:MINOR]}.#{ConfigMap[:TEENY]}"
end
##