aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index 6a8933c392..988dcf3a23 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -391,7 +391,7 @@ puts Tempfile.new('foo').path
actual = Dir.glob(TRAVERSAL_PATH + '*').count
assert_equal expect, actual
ensure
- t.close!
+ t&.close!
end
def test_create_traversal_dir
@@ -400,6 +400,6 @@ puts Tempfile.new('foo').path
actual = Dir.glob(TRAVERSAL_PATH + '*').count
assert_equal expect, actual
ensure
- t.close
+ t&.close
end
end