summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-25 07:55:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-25 07:55:52 +0000
commit892a97ebebb04d79f1111300a3b62ebde5edbb97 (patch)
tree5cf8660ca2aefc1c288f2925545098620c7acd52
parent3f818a33a84337fda559243a14fac480f8b25d4c (diff)
specification.rb: fix leaked FDs
* lib/rubygems/specification.rb (build_extensions): close redirection FDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rubygems/specification.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index d760ab4a83..3b803fa785 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1431,11 +1431,13 @@ class Gem::Specification < Gem::BasicSpecification
require 'rubygems/ext'
require 'rubygems/user_interaction'
- Gem::DefaultUserInteraction.use_ui Gem::SilentUI.new do
+ ui = Gem::SilentUI.new
+ Gem::DefaultUserInteraction.use_ui ui do
builder = Gem::Ext::Builder.new self
builder.build_extensions
end
ensure
+ ui.close if ui
Gem::Specification.unresolved_deps.replace unresolved_deps
end
end