Actions
Bug #5045
closedwrong method in doc of Net::HTTP
Description
Hello,
I found a small typo in the documentation of Net::HTTP:
diff --git a/lib/net/http.rb b/lib/net/http.rb
index f898588..7c9032a 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -108,7 +108,7 @@ module Net #:nodoc:
If you wish to re-use a connection across multiple HTTP requests without¶
automatically closing it you can use ::new instead of ::start. #request¶
will automatically open a connection to the server if one is not currently¶
-
open. You can manually close the connection with #close.¶
There is no method #close, it is named #finish.
I find #close clearer, and #finish being the opposite of ::start is unfortunate (because ::start automatically close the connection at the end of the block, while #new not, as written upper).
Another way to solve this might be to alias #close to #finish, what do you think ?
Actions
Like0
Like0