aboutsummaryrefslogtreecommitdiffstats
path: root/test/net
diff options
context:
space:
mode:
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/test_http.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index c8792114b4..b9076056b4 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -360,7 +360,8 @@ __EOM__
_test_set_form_multipart(http, false, data, expected)
_test_set_form_multipart(http, true, data, expected)
}
- file.close(true)
+ ensure
+ file.close! if file
end
def _test_set_form_urlencoded(http, data)
@@ -421,7 +422,8 @@ __EOM__
res = http.request req
#assert_equal(expected, res.body)
}
- file.close(true)
+ ensure
+ file.close! if file
end
end