summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 09:27:15 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 09:27:15 +0000
commitcc71b88c8917ed92a95890f9d334f23f7d36e646 (patch)
tree777627174f7baac76b194b20e1251284d7be7c4c
parentf6ccae29c36ebed51c1ee7b5471489ebda4240dc (diff)
downloadruby-cc71b88c8917ed92a95890f9d334f23f7d36e646.tar.gz
ruby-cc71b88c8917ed92a95890f9d334f23f7d36e646.tar.xz
ruby-cc71b88c8917ed92a95890f9d334f23f7d36e646.zip
* lib/tempfile.rb: fixed a stupid bug. [ruby-talk:95680]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/tempfile.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index 8ebabc9ea..a78b9469d 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -78,7 +78,6 @@ class Tempfile < SimpleDelegator
@tmpfile.close if @tmpfile
@tmpfile = nil
@data[1] = nil if @data
- @data = nil
end
protected :_close
@@ -100,7 +99,7 @@ class Tempfile < SimpleDelegator
_close
@clean_proc.call
ObjectSpace.undefine_finalizer(self)
- @tmpname = nil
+ @data = @tmpname = nil
end
# Unlinks the file. On UNIX-like systems, it is often a good idea