summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb2
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb6
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index a5a9202e56..53be979a52 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -10,7 +10,7 @@ require 'rbconfig'
require 'thread'
module Gem
- VERSION = "2.6.14.1"
+ VERSION = "2.6.14.2"
end
# Must be first since it unloads the prelude from 1.9.2
diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb
index b6dde01950..965b728278 100644
--- a/lib/rubygems/ext/ext_conf_builder.rb
+++ b/lib/rubygems/ext/ext_conf_builder.rb
@@ -27,9 +27,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
# TODO: Make this unconditional when rubygems no longer supports Ruby 1.9.x.
tmp_dest = get_relative_path(tmp_dest) unless Gem.win_platform? && RUBY_VERSION <= '2.0'
- t = nil
Tempfile.open %w"siteconf .rb", "." do |siteconf|
- t = siteconf
siteconf.puts "require 'rbconfig'"
siteconf.puts "dest_path = #{tmp_dest.dump}"
%w[sitearchdir sitelibdir].each do |dir|
@@ -37,7 +35,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
siteconf.puts "RbConfig::CONFIG['#{dir}'] = dest_path"
end
- siteconf.flush
+ siteconf.close
destdir = ENV["DESTDIR"]
@@ -78,9 +76,9 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
end
ensure
ENV["DESTDIR"] = destdir
+ siteconf.close!
end
end
- t.unlink if t and t.path
results
ensure