From: Minero Aoki Date: 2001-09-22T07:38:49+09:00 Subject: [ruby-list:31570] Re: net/pop あおきです。 In mail "[ruby-list:31568] net/pop" OHARA Shigeki wrote: > 大原です。 > > ruby-1.6.5 からなのですが、 > net/pop で POP の認証に失敗した場合に、 > 以下のように ArgumentError が発生するようになってしまいました。 どうも Exception.exception がらみの変化みたいですね。 添付パッチでどうでしょうか。 ------------------------------------------------------------------- 青木峰郎 diff -u -r1.32 -r1.33 --- pop.rb 17 Aug 2001 03:01:41 -0000 1.32 +++ pop.rb 21 Sep 2001 18:14:13 -0000 1.33 @@ -249,12 +249,10 @@ def check_reply_auth begin - cod = check_reply( SuccessCode ) - rescue ProtocolError - raise ProtoAuthError, 'Fail to POP authentication' + return check_reply( SuccessCode ) + rescue ProtocolError => err + raise ProtoAuthError.new( 'Fail to POP authentication', err.response ) end - - return cod end def get_reply @@ -276,7 +274,7 @@ rep = super( sock ) m = /<.+>/.match( rep.msg ) or - raise ProtoAuthError, "not APOP server: cannot login" + raise ProtoAuthError.new( "not APOP server: cannot login", nil ) @stamp = m[0] end