aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-20 21:50:14 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-20 21:50:14 +0000
commitb9259b1dc3ccd53c0d5e717876a1a6e6ef69e79d (patch)
tree4503951c4706c6a5bd4ab27c4c424f40428b32ca /lib
parent838ba4dee5bda4401fc28a7d082919b0c1f1749c (diff)
downloadruby-b9259b1dc3ccd53c0d5e717876a1a6e6ef69e79d.tar.gz
Prefer adapting specs to complicating library code
* lib/net/ftp.rb (Net::FTP#initialize): simplify as per the original intent. * spec/ruby/library/net/ftp/initialize_spec.rb: adapt specs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/ftp.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index 31c4fb007e..cafe39fad0 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -262,13 +262,7 @@ module Net
@ssl_handshake_timeout = options[:ssl_handshake_timeout]
@read_timeout = options[:read_timeout] || 60
if host
- if options[:port]
- connect(host, options[:port] || FTP_PORT)
- else
- # spec/ruby/library/net/ftp/initialize_spec.rb depends on
- # the number of arguments passed to connect....
- connect(host)
- end
+ connect(host, options[:port] || FTP_PORT)
if options[:username]
login(options[:username], options[:password], options[:account])
end