summaryrefslogtreecommitdiffstats
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-06 07:21:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-06 07:21:26 +0000
commit64e7ed11fda266dbbd72e6b80acd310149b1ec71 (patch)
treef5320945b9bfd9fc19b133335a7be45076fe03e9 /lib/tempfile.rb
parent71898e529579cd40593098e619ed16346a861a50 (diff)
downloadruby-64e7ed11fda266dbbd72e6b80acd310149b1ec71.tar.gz
ruby-64e7ed11fda266dbbd72e6b80acd310149b1ec71.tar.xz
ruby-64e7ed11fda266dbbd72e6b80acd310149b1ec71.zip
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index c43228530..0e4c99e5f 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -52,7 +52,7 @@ class Tempfile < SimpleDelegator
@clean_files = Tempfile.callback(tmpname, @protect)
ObjectSpace.define_finalizer(self, @clean_files)
- @tmpfile = File.open(tmpname, 'w+')
+ @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL)
@protect[0] = @tmpfile
@tmpname = tmpname
super(@tmpfile)