aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/test_case.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 02:26:39 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 02:26:39 +0000
commit7fbb9078fe61104606a40e4e450a2cd1a33f8ca1 (patch)
treebd57731d31e70e0b5837bcff618f0b56b2be3b5e /lib/rubygems/test_case.rb
parent6cc4937aec6596bff58fc946b4b00c7b546e494a (diff)
downloadruby-7fbb9078fe61104606a40e4e450a2cd1a33f8ca1.tar.gz
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.2.
Please see entries of 2.6.2 on https://github.com/rubygems/rubygems/blob/master/History.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r--lib/rubygems/test_case.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index bde4ed6713..f7ae97cd8d 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -223,6 +223,10 @@ class Gem::TestCase < MiniTest::Unit::TestCase
@orig_gem_spec_cache = ENV['GEM_SPEC_CACHE']
@orig_rubygems_gemdeps = ENV['RUBYGEMS_GEMDEPS']
@orig_rubygems_host = ENV['RUBYGEMS_HOST']
+ ENV.keys.find_all { |k| k.start_with?('GEM_REQUIREMENT_') }.each do |k|
+ ENV.delete k
+ end
+ @orig_gem_env_requirements = ENV.to_hash
ENV['GEM_VENDOR'] = nil
@@ -288,6 +292,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
ENV['HOME'] = @userhome
Gem.instance_variable_set :@user_home, nil
Gem.instance_variable_set :@gemdeps, nil
+ Gem.instance_variable_set :@env_requirements_by_name, nil
Gem.send :remove_instance_variable, :@ruby_version if
Gem.instance_variables.include? :@ruby_version
@@ -379,6 +384,11 @@ class Gem::TestCase < MiniTest::Unit::TestCase
FileUtils.rm_rf @tempdir unless ENV['KEEP_FILES']
+ ENV.clear
+ @orig_gem_env_requirements.each do |k,v|
+ ENV[k] = v
+ end
+
ENV['GEM_HOME'] = @orig_gem_home
ENV['GEM_PATH'] = @orig_gem_path
ENV['GEM_VENDOR'] = @orig_gem_vendor
@@ -1504,4 +1514,3 @@ tmpdirs << (ENV['GEM_PATH'] = Dir.mktmpdir("path"))
pid = $$
END {tmpdirs.each {|dir| Dir.rmdir(dir)} if $$ == pid}
Gem.clear_paths
-