mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
57940c0323
commit
da63c5ca4b
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue