summaryrefslogtreecommitdiff
path: root/test
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 /test
parentf8cd2190f031a3588e1057d08d3ae8d3c864eb18 (diff)
* 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')
-rw-r--r--test/net/ftp/test_ftp.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb
index a8d34c6..3af00e7 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