summaryrefslogtreecommitdiff
path: root/lib/net/ftp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/ftp.rb')
-rw-r--r--lib/net/ftp.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index 436ccd937f..e0aa6f6adb 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -396,9 +396,11 @@ module Net
synchronize do
resp = sendcmd('USER ' + user)
if resp[0] == ?3
+ raise FTPReplyError, resp if passwd.nil?
resp = sendcmd('PASS ' + passwd)
end
if resp[0] == ?3
+ raise FTPReplyError, resp if acct.nil?
resp = sendcmd('ACCT ' + acct)
end
end