aboutsummaryrefslogtreecommitdiffstats
path: root/lib/open-uri.rb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-11 03:48:45 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-11 03:48:45 +0000
commit8aad4296239828d29f7ab6938d7f6f4e84ee7135 (patch)
tree9e024cdf39ee192e781d58821692c82151ead7a2 /lib/open-uri.rb
parentcdb62cc15f6b8a9106e3dc3af9d79b95e76f6cd7 (diff)
downloadruby-8aad4296239828d29f7ab6938d7f6f4e84ee7135.tar.gz
* lib/net/ftp.rb (initialize): Connections are in passive mode per
default now. The default mode can be changed by Net::FTP.default_passive=. * lib/net/ftp.rb (default_passive=, default_passive): new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r--lib/open-uri.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index c63e5292aa..9e4a5e24c1 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -773,7 +773,7 @@ module URI
# The access sequence is defined by RFC 1738
ftp = Net::FTP.new
ftp.connect(self.hostname, self.port)
- ftp.passive = true if !options[:ftp_active_mode]
+ ftp.passive = !options[:ftp_active_mode]
# todo: extract user/passwd from .netrc.
user = 'anonymous'
passwd = nil