remove another line from the getline method
remove out commented code
This commit is contained in:
parent
b5bed34702
commit
69e01eb87c
1 changed files with 0 additions and 12 deletions
|
|
@ -92,22 +92,10 @@ class NNTP
|
|||
putline cmd
|
||||
end
|
||||
|
||||
# def getline
|
||||
# line = ''
|
||||
# line.concat @socket.recv 1 until line.length > 2 and line[-1] == "\n" or line[-2..-1] == "\r\n"
|
||||
# puts '*getline* '+line if @debuglevel > 0
|
||||
# line = line[0...-2] if line[-2..-1] == "\r\n"
|
||||
# line = line[0...-1] if "\r\n".include? line[-1].to_s
|
||||
# return line
|
||||
# end
|
||||
|
||||
def getline
|
||||
line = ''
|
||||
line = @socket.readline
|
||||
print "*getline* '#{line}'" if @debuglevel > 0
|
||||
line.chomp!("\r\n")
|
||||
# line.sub!(/\r?\n?$/, '')
|
||||
# print "*getline* matches end\n" if line == '.'
|
||||
return line
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue