summaryrefslogtreecommitdiff
path: root/lib/ftplib.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftplib.rb')
-rw-r--r--lib/ftplib.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/ftplib.rb b/lib/ftplib.rb
index 617d858..4cba9c5 100644
--- a/lib/ftplib.rb
+++ b/lib/ftplib.rb
@@ -293,11 +293,7 @@ class FTP
buf = file.gets
break if buf == nil
if buf[-2, 2] != CRLF
- if buf[-1] == ?\r or
- buf[-1] == ?\n
- buf = buf[0 .. -2]
- end
- buf = buf + CRLF
+ buf = buf.chop + CRLF
end
conn.write(buf)
callback.call(buf) if use_callback