mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
91faa496b3
commit
d5158a0833
1 changed files with 1 additions and 2 deletions
|
@ -78,7 +78,6 @@ class Tempfile < SimpleDelegator
|
||||||
@tmpfile.close if @tmpfile
|
@tmpfile.close if @tmpfile
|
||||||
@tmpfile = nil
|
@tmpfile = nil
|
||||||
@data[1] = nil if @data
|
@data[1] = nil if @data
|
||||||
@data = nil
|
|
||||||
end
|
end
|
||||||
protected :_close
|
protected :_close
|
||||||
|
|
||||||
|
@ -100,7 +99,7 @@ class Tempfile < SimpleDelegator
|
||||||
_close
|
_close
|
||||||
@clean_proc.call
|
@clean_proc.call
|
||||||
ObjectSpace.undefine_finalizer(self)
|
ObjectSpace.undefine_finalizer(self)
|
||||||
@tmpname = nil
|
@data = @tmpname = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# Unlinks the file. On UNIX-like systems, it is often a good idea
|
# Unlinks the file. On UNIX-like systems, it is often a good idea
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue