diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-10 15:58:59 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-10 15:58:59 +0000 |
commit | 940104867afa60068c4cc8410b3b0597509832cd (patch) | |
tree | 1d0deff6755ff4fd4846f3312ca975837aa8271c | |
parent | f8beb090b7237413ae223967896a4e06e169d327 (diff) |
merges r28093 from trunk into ruby_1_9_2.
--
* 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/branches/ruby_1_9_2@28266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | lib/tempfile.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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 16:54:34 2010 Yusuke Endoh <mame@tsg.ne.jp> * file.c (rb_file_directory_p): update rdoc. a patch from Ilkka 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 |