diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-01 13:43:43 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-01 13:43:43 +0000 |
commit | 1c4c8b743eca70d4631be366f2c92e4aabcd5a21 (patch) | |
tree | b46a432476371eed699f5553643f6b7e36405b05 /lib/net/smtp.rb | |
parent | 4fcb1c47e5402c8ded1ad60a4ee66fa0756a3a0e (diff) |
o smtp.rb: not catch NameError in auth
o http.rb: not close connection in get_body,
Only connection() closes socket
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r-- | lib/net/smtp.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 09ae8ecb66..d11cff6235 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -141,12 +141,11 @@ Net::Protocol end if user and secret then - begin - mid = 'auth_' + (authtype || 'cram_md5').to_s - @command.send mid, user, secret - rescue NameError + mid = 'auth_' + (authtype || 'cram_md5').to_s + unless @command.respond_to? mid then raise ArgumentError, "wrong auth type #{authtype.to_s}" end + @command.send mid, user, secret end end |