summaryrefslogtreecommitdiff
path: root/test/ruby/test_file_exhaustive.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-20 08:27:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-20 08:27:14 +0000
commit471457733e77cdaeeb138e9df331dcf3ccb4f6c1 (patch)
tree86169c77877901abb39b0b559b7aed7af226777e /test/ruby/test_file_exhaustive.rb
parentb386332792332f6e136ede00e2b3f61dacd80b13 (diff)
file.c: fix handle leak
* file.c (rb_file_identical_p): fix handle leak, ensure to close the handle of the first argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_file_exhaustive.rb')
-rw-r--r--test/ruby/test_file_exhaustive.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 84a6181e89..b347e53d16 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -311,6 +311,8 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_raise(IOError) {
File.identical?(@file, io)
}
+ File.unlink(@file)
+ assert_file.not_exist?(@file)
end
def test_s_size