diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-03 09:20:35 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-03 09:20:35 +0000 |
commit | e5e43a1064cb43237ba8459e7cf68d2d2924c4a8 (patch) | |
tree | 53394db0c07cb07d0b03da7bdeec7e536548ef5e /lib/net | |
parent | c3809425defcad3aa68044ae6df5828180734621 (diff) | |
download | ruby-e5e43a1064cb43237ba8459e7cf68d2d2924c4a8.tar.gz ruby-e5e43a1064cb43237ba8459e7cf68d2d2924c4a8.tar.xz ruby-e5e43a1064cb43237ba8459e7cf68d2d2924c4a8.zip |
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.26.
* lib/net/protocol.rb (finish): do nothing unless active.
* lib/net/http.rb: HTTP#{get,post}2 again (for new impl).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/http.rb | 13 | ||||
-rw-r--r-- | lib/net/protocol.rb | 7 |
2 files changed, 6 insertions, 14 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index c5612c875..5e66f9dde 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -248,30 +248,23 @@ module Net undef head alias head head2 - undef head2 - alias old_get2 get2 - undef get2 undef get def get( path, u_header = nil, dest = nil, &block ) - old_get2( path, u_header ) {|f| f.body( dest, &block ) } + get2( path, u_header ) {|f| f.body( dest, &block ) } end - alias old_post2 post2 - undef post2 undef post def post( path, data, u_header = nil, dest = nil, &block ) - old_post2( path, data, u_header ) {|f| f.body( dest, &block ) } + post2( path, data, u_header ) {|f| f.body( dest, &block ) } end - alias old_put2 put2 - undef put2 undef put def put( path, src, u_header = nil ) - old_put2( path, src, u_header ) {|f| f.body } + put2( path, src, u_header ) {|f| f.body } end ^ diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index f438a86c7..10bc8b0a1 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -64,7 +64,7 @@ module Net class Protocol - Version = '1.1.25' + Version = '1.1.26' class << self @@ -173,13 +173,12 @@ module Net end def finish - ret = active? + return false unless active? do_finish disconnect @active = false - - ret + true end def active? |