summaryrefslogtreecommitdiff
path: root/test/scanf/test_scanfio.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-28 12:31:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-28 12:31:21 +0900
commitdc7da30bedd48d2ba38ce9cac05e378f0c823b50 (patch)
tree338533dc3e7714f69a5cedecbaa5d033747ff923 /test/scanf/test_scanfio.rb
parentc9bbcaccf28c2a374f6530a36355b6d6f16e25cc (diff)
Close leaked file descriptor
Diffstat (limited to 'test/scanf/test_scanfio.rb')
-rw-r--r--test/scanf/test_scanfio.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/scanf/test_scanfio.rb b/test/scanf/test_scanfio.rb
index f7c439276d..e3b8f45bf4 100644
--- a/test/scanf/test_scanfio.rb
+++ b/test/scanf/test_scanfio.rb
@@ -23,6 +23,8 @@ class TestScanfIO < Test::Unit::TestCase
w.write('a')
w.close
assert_equal([], r.scanf('a'))
+ ensure
+ r.close
end
end