diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-11 03:48:45 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-11 03:48:45 +0000 |
commit | 8aad4296239828d29f7ab6938d7f6f4e84ee7135 (patch) | |
tree | 9e024cdf39ee192e781d58821692c82151ead7a2 /test/net/ftp/test_ftp.rb | |
parent | cdb62cc15f6b8a9106e3dc3af9d79b95e76f6cd7 (diff) | |
download | ruby-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 'test/net/ftp/test_ftp.rb')
-rw-r--r-- | test/net/ftp/test_ftp.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index a8d34c62de..3af00e7da9 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -11,9 +11,12 @@ class FTPTest < Test::Unit::TestCase def setup @thread = nil + @default_passive = Net::FTP.default_passive + Net::FTP.default_passive = false end def teardown + Net::FTP.default_passive = @default_passive if @thread @thread.join end |