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 ?
Updated by drbrain (Eric Hodel) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r32614.
Benoit, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/net/http.rb: Net::HTTP#finish is used to manually close
connections. [Ruby 1.9 - Bug #5045]
Actions
Like0
Like0