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 737a7ebca1..40c79c885d 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -374,9 +374,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