diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-04 04:55:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-04 04:55:23 +0000 |
commit | da63c5ca4bc47a48d373aadaece69863f8b775eb (patch) | |
tree | 12fc07f06dee1a6d30b6b656f1d9d65b7103229b | |
parent | 57940c032366f25ff118bb5b6c305fe103431e29 (diff) | |
download | ruby-da63c5ca4bc47a48d373aadaece69863f8b775eb.tar.gz |
* test/rubygems/gemutilities.rb (setup): use ENV["RUBY"] before
installation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/rubygems/gemutilities.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/rubygems/gemutilities.rb b/test/rubygems/gemutilities.rb index 33dbe646cb..43334f51e1 100644 --- a/test/rubygems/gemutilities.rb +++ b/test/rubygems/gemutilities.rb @@ -77,6 +77,11 @@ class RubyGemTestCase < MiniTest::Unit::TestCase Gem.ensure_gem_subdirectories @gemhome + if ruby = ENV['RUBY'] + Gem.class_eval {ruby, @ruby = @ruby, ruby} + @orig_ruby = ruby + end + @orig_ENV_HOME = ENV['HOME'] ENV['HOME'] = @userhome Gem.instance_variable_set :@user_home, nil @@ -153,6 +158,10 @@ class RubyGemTestCase < MiniTest::Unit::TestCase Gem.clear_paths + if ruby = @orig_ruby + Gem.class_eval {@ruby = @ruby} + end + if @orig_ENV_HOME then ENV['HOME'] = @orig_ENV_HOME else |