aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-30 07:01:29 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-30 07:01:29 +0000
commit2efafeaa8632a9906b2cd69ffeb2fe870fc263aa (patch)
tree70203a029bdfb8923bbf0d2a8f190fe4f0696ee4 /lib/tempfile.rb
parent42152c6e8df70048920de38a0574153ec429e35b (diff)
downloadruby-2efafeaa8632a9906b2cd69ffeb2fe870fc263aa.tar.gz
* lib/tempfile.rb (Tempfile#initialize): initialize @unlinked to fix
test failures introduced at r50682. I hope that check the results of tests before committing, at least the tests about the changed feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index 8c8e288c28..e2bb9d1f0b 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -125,6 +125,7 @@ class Tempfile < DelegateClass(File)
def initialize(basename="", tmpdir=nil, mode: 0, **options)
warn "Tempfile.new doesn't call the given block." if block_given?
+ @unlinked = false
@mode = mode|File::RDWR|File::CREAT|File::EXCL
::Dir::Tmpname.create(basename, tmpdir, options) do |tmpname, n, opts|
opts[:perm] = 0600