aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-19 12:44:46 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-19 12:44:46 +0000
commit673a5f2f358fee4a851278f50eeba4ba7c3dae3a (patch)
tree20457b92a54500b0a42ceb4f0f42da7a8a80d7ac /test/test_tempfile.rb
parentcf55f838893613142e0a724b01e92fc70a9b15b5 (diff)
downloadruby-673a5f2f358fee4a851278f50eeba4ba7c3dae3a.tar.gz
Of course, opened file is not able to unlink on Windows
* test/test_tempfile.rb (test_create_with_block): close the tempfile before unlink. fixed a failure on Windows introduced at r58791. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index 92ec988f63..8973051636 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -346,6 +346,7 @@ puts Tempfile.new('foo').path
Tempfile.create("tempfile-create") {|f|
path = f.path
+ f.close
File.unlink(f.path)
}
assert_file.not_exist?(path)