From d5158a0833e631a4728bf0d70552cd16c8bc25db Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 Mar 2004 09:27:15 +0000 Subject: * lib/tempfile.rb: fixed a stupid bug. [ruby-talk:95680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/tempfile.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/tempfile.rb') diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 8ebabc9ea9..a78b9469db 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 -- cgit v1.2.3