diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-03 19:03:16 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-03 19:03:16 +0000 |
commit | 56b089a4c9c2aa730a13f1daf021ecdf0ed78d47 (patch) | |
tree | 12597b510228a84f98541f787c96a8c2a3807bdc /lib/net/protocol.rb | |
parent | 299d6b14377720678401beaacef1ff8aa15c020d (diff) | |
download | ruby-56b089a4c9c2aa730a13f1daf021ecdf0ed78d47.tar.gz ruby-56b089a4c9c2aa730a13f1daf021ecdf0ed78d47.tar.xz ruby-56b089a4c9c2aa730a13f1daf021ecdf0ed78d47.zip |
aamine
* lib/net/http.rb (HTTP#request_by_name): bug fix.
* lib/net/http.rb: does not write Connection: by default.
* lib/net/protocol.rb: "start" for started protocol is an error.
* lib/net/protocol.rb: "finish" for finished protocol is an error.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r-- | lib/net/protocol.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index d810ac2f9..aba2256b6 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -122,7 +122,7 @@ module Net # def start( *args ) - return false if active? + active? and raise IOError, 'protocol has been opened already' if block_given? then begin @@ -134,6 +134,7 @@ module Net else _start args end + nil end private @@ -177,12 +178,12 @@ module Net public def finish - return false unless active? + active? or raise IOError, 'already closed protocol' do_finish if @command and not @command.critical? disconnect @active = false - true + nil end private |