summaryrefslogtreecommitdiff
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
commit58af10ecbdfa4053eeafa9c8bcdcda54be7125d7 (patch)
tree9e024cdf39ee192e781d58821692c82151ead7a2 /lib/open-uri.rb
parentf8cd2190f031a3588e1057d08d3ae8d3c864eb18 (diff)
downloadruby-58af10ecbdfa4053eeafa9c8bcdcda54be7125d7.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