fix warnings

This commit is contained in:
Ward Wouts 2004-09-01 11:26:43 +00:00
parent f0f26c4b8f
commit 014598d807

View file

@ -135,11 +135,11 @@ class NNTP
end end
def newgroups(date, time) def newgroups(date, time)
return longcmd "NEWGROUPS #{date.to_s} #{time.to_s}" return longcmd("NEWGROUPS #{date.to_s} #{time.to_s}")
end end
def newnews(group, date, time) def newnews(group, date, time)
return longcmd "NEWNEWS #{group} #{date.to_s} #{time.to_s}" return longcmd("NEWNEWS #{group} #{date.to_s} #{time.to_s}")
end end
def list def list
@ -172,7 +172,7 @@ class NNTP
end end
def help def help
return longcmd "HELP" return longcmd("HELP")
end end
def statparse(resp) def statparse(resp)
@ -196,15 +196,15 @@ class NNTP
end end
def stat(id) def stat(id)
return statcmd "STAT #{id}" return statcmd("STAT #{id}")
end end
def next def next
return statcmd "NEXT" return statcmd("NEXT")
end end
def last def last
return statcmd "LAST" return statcmd("LAST")
end end
def articlecmd(line) def articlecmd(line)
@ -214,19 +214,19 @@ class NNTP
end end
def head(id) def head(id)
return articlecmd "HEAD #{id}" return articlecmd("HEAD #{id}")
end end
def body(id) def body(id)
return articlecmd "BODY #{id}" return articlecmd("BODY #{id}")
end end
def article(id) def article(id)
return articlecmd "ARTICLE #{id}" return articlecmd("ARTICLE #{id}")
end end
def slave(id) def slave(id)
return shortcmd "SLAVE" return shortcmd("SLAVE")
end end
def xhdr(hdr, str) def xhdr(hdr, str)
@ -251,7 +251,7 @@ class NNTP
} }
return resp, xover_lines return resp, xover_lines
rescue RuntimeError rescue RuntimeError
raise NNTPDataError line, caller raise(NNTPDataError, line, caller)
end end
end end
@ -273,7 +273,7 @@ class NNTP
raise NNTPDataError unless resp.length == 2 raise NNTPDataError unless resp.length == 2
date = resp[1][2...8] date = resp[1][2...8]
time = resp[1][-6..-1] time = resp[1][-6..-1]
raise NNTPDataError resp, caller unless date.length == 6 and time.length == 6 raise(NNTPDataError, resp, caller) unless date.length == 6 and time.length == 6
return resp, date, time return resp, date, time
end end