aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-30 12:51:32 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-30 12:51:32 +0000
commitd980b8f61a7126ea75a4f64d5343c4a5218feb16 (patch)
tree5ffce71dd6a6481e9f42279cd875ea47e41504b9
parent2a0c12cce4691a2cab93e17129768a06f0b132e5 (diff)
downloadruby-d980b8f61a7126ea75a4f64d5343c4a5218feb16.tar.gz
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rwxr-xr-xlib/tempfile.rb2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 00dd6265f7..982bcd740d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun May 30 21:48:07 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * 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@ruby-lang.org>
* ext/nkf/nkf-utf8/nkf.c: updated to b856dd07.
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index c45865d7a3..54f00de2b0 100755
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -236,7 +236,7 @@ class Tempfile < DelegateClass(File)
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