betere check

This commit is contained in:
Ward Wouts 2005-12-06 21:43:58 +00:00
parent 45d000b794
commit 8491d2db44

View file

@ -104,7 +104,7 @@ class NNTP
puts "*getresp* #{resp}" if @debuglevel > 0 puts "*getresp* #{resp}" if @debuglevel > 0
c = resp[0] c = resp[0]
case c case c
when c == nil then raise NNTPProtocolError, resp, caller when c.nil? then raise NNTPProtocolError, resp, caller
when c == '4' then raise NNTPTemporaryError, resp, caller when c == '4' then raise NNTPTemporaryError, resp, caller
when c == '5' then raise NNTPPermanentError, resp, caller when c == '5' then raise NNTPPermanentError, resp, caller
when '123'.include?(c) then raise NNTPProtocolError, resp, caller when '123'.include?(c) then raise NNTPProtocolError, resp, caller