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

ruby-changes:16135

From: mame <ko1@a...>
Date: Sun, 30 May 2010 21:51:48 +0900 (JST)
Subject: [ruby-changes:16135] Ruby:r28093 (trunk): * lib/tempfile.rb (Tempfile#unlink): leave @data. Assigning nil to

mame	2010-05-30 21:51:32 +0900 (Sun, 30 May 2010)

  New Revision: 28093

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

  Log:
    * lib/tempfile.rb (Tempfile#unlink): leave @data.  Assigning nil to
      @data caused double closing error of the same IO in finalizer.  a
      patch from Simon Nicholls.  [ruby-core:29395]

  Modified files:
    trunk/ChangeLog
    trunk/lib/tempfile.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28092)
+++ ChangeLog	(revision 28093)
@@ -1,3 +1,9 @@
+Sun May 30 21:48:07 2010  Yusuke Endoh  <mame@t...>
+
+	* lib/tempfile.rb (Tempfile#unlink): leave @data.  Assigning nil to
+	  @data caused double closing error of the same IO in finalizer.  a
+	  patch from Simon Nicholls.  [ruby-core:29395]
+
 Sun May 30 18:47:15 2010  NARUSE, Yui  <naruse@r...>
 
 	* ext/nkf/nkf-utf8/nkf.c: updated to b856dd07.
Index: lib/tempfile.rb
===================================================================
--- lib/tempfile.rb	(revision 28092)
+++ lib/tempfile.rb	(revision 28093)
@@ -236,7 +236,7 @@
       end
       # remove tmpname from remover
       @data[0] = @data[2] = nil
-      @data = @tmpname = nil
+      @tmpname = nil
     rescue Errno::EACCES
       # may not be able to unlink on Windows; just ignore
     end

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

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