diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-20 15:16:24 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-20 15:16:24 +0000 |
commit | 65261bda4d964c081fc3a510bfaa094a7647e8bc (patch) | |
tree | dda7b6abe5ba42627579ba50b7425c18a010604e /lib/tempfile.rb | |
parent | 45e02258c0415e44296c3d3a783238f248d3035e (diff) | |
download | bundler-65261bda4d964c081fc3a510bfaa094a7647e8bc.tar.gz |
* lib/tempfile.rb (Tempfile.create): Close when the block exits.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index fd334c173a..971e1919ea 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -370,6 +370,7 @@ def Tempfile.create(basename, *rest) begin yield tmpfile ensure + tmpfile.close if !tmpfile.closed? File.unlink tmpfile end else |