[前][次][番号順一覧][スレッド一覧]

ruby-changes:34863

From: nobu <ko1@a...>
Date: Fri, 25 Jul 2014 16:56:07 +0900 (JST)
Subject: [ruby-changes:34863] nobu:r46946 (trunk): specification.rb: fix leaked FDs

nobu	2014-07-25 16:55:52 +0900 (Fri, 25 Jul 2014)

  New Revision: 46946

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46946

  Log:
    specification.rb: fix leaked FDs
    
    * lib/rubygems/specification.rb (build_extensions): close
      redirection FDs.

  Modified files:
    trunk/lib/rubygems/specification.rb
Index: lib/rubygems/specification.rb
===================================================================
--- lib/rubygems/specification.rb	(revision 46945)
+++ lib/rubygems/specification.rb	(revision 46946)
@@ -1431,11 +1431,13 @@ class Gem::Specification < Gem::BasicSpe https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1431
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]