summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/test_case.rb6
1 files changed, 5 insertions, 1 deletions
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