From fe46b2d5f05057dd2d238d71fc2276406d259cef Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 8 Jan 2014 08:13:56 +0000 Subject: [PATCH] rubygems/test_case.rb: fix errors in mkmf tests * lib/rubygems/test_case.rb (Gem#teardown): BASERUBY is not set usually. fix errors in mkmf tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems/test_case.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index ff261f7816..fb5f3008e2 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -315,7 +315,11 @@ class Gem::TestCase < MiniTest::Unit::TestCase def teardown $LOAD_PATH.replace @orig_LOAD_PATH if @orig_LOAD_PATH - RbConfig::CONFIG['BASERUBY'] = @orig_BASERUBY + if @orig_BASERUBY + RbConfig::CONFIG['BASERUBY'] = @orig_BASERUBY + else + RbConfig::CONFIG.delete('BASERUBY') + end RbConfig::CONFIG['arch'] = @orig_arch if defined? Gem::RemoteFetcher then