summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_file.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-28 16:51:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-28 16:51:41 +0000
commita705017bd1e1190ccbf975fac631f313645f7fa8 (patch)
treef86ea8a92bf4dcf23b500dff988e8225aed8177a /test/ruby/test_file.rb
parentfcf498a543a3d39cf3fef04bee29176ba14acb61 (diff)
downloadruby-a705017bd1e1190ccbf975fac631f313645f7fa8.tar.gz
ruby-a705017bd1e1190ccbf975fac631f313645f7fa8.tar.xz
ruby-a705017bd1e1190ccbf975fac631f313645f7fa8.zip
don't generate temporary files under current directory.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_file.rb')
-rw-r--r--test/ruby/test_file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index e326b97b0..2670933de 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -7,7 +7,7 @@ class TestFile < Test::Unit::TestCase
# I don't know Ruby's spec about "unlink-before-close" exactly.
# This test asserts current behaviour.
def test_unlink_before_close
- filename = File.basename(__FILE__) + ".#{$$}"
+ filename = Dir.tmpdir + '/' + File.basename(__FILE__) + ".#{$$}"
w = File.open(filename, "w")
w << "foo"
w.close