summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-11 09:21:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-11 09:21:21 +0900
commita6b5d70bcabe66041376d5a82cedea9f2a391da8 (patch)
tree1ffce7c82e29f2b9b53dcb0a8b1782bfa0a7c735 /test
parentef88225886dd4ceecae07ddd22108ef4da542396 (diff)
Create the test file under the created temporary directory
Fixes https://github.com/ruby/ruby/pull/4255
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_file_exhaustive.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 0cb63c8f05..eaafe4a6e8 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -680,7 +680,7 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_equal(t + 1, File.atime(zerofile))
assert_equal(t + 2, File.mtime(zerofile))
Dir.mktmpdir do |dir|
- Dir.chdir do
+ Dir.chdir(dir) do
path = "foo\u{30b3 30d4 30fc}"
File.write(path, "") rescue next
assert_equal(1, File.utime(nil, nil, path))