From fa7066f81839060d0a49f674625e6382233dcd3d Mon Sep 17 00:00:00 2001 From: shugo Date: Tue, 29 Nov 2016 08:44:21 +0000 Subject: [PATCH] Suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/ftp.rb | 1 + test/net/ftp/test_ftp.rb | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 47501a6824..601d2cb4c3 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -242,6 +242,7 @@ module Net raise ArgumentError, "private_data_connection can be set to true only when ssl is enabled" end + @private_data_connection = false end @binary = true if options[:passive].nil? diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index db36993280..6b736f9eb7 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -1009,8 +1009,8 @@ EOF commands.push(sock.gets) sock.print("150 Opening TEXT mode data connection for foo (#{text_data.size} bytes)\r\n") conn = TCPSocket.new(host, port) - text_data.each_line do |line| - conn.print(line) + text_data.each_line do |l| + conn.print(l) end conn.shutdown(Socket::SHUT_WR) conn.read @@ -1072,8 +1072,8 @@ EOF commands.push(sock.gets) sock.print("150 Opening TEXT mode data connection for foo (#{text_data.size} bytes)\r\n") conn = TCPSocket.new(host, port) - text_data.each_line do |line| - conn.print(line) + text_data.each_line do |l| + conn.print(l) end conn.shutdown(Socket::SHUT_WR) conn.read @@ -1132,8 +1132,8 @@ EOF commands.push(sock.gets) sock.print("150 Opening TEXT mode data connection for foo (#{text_data.size} bytes)\r\n") conn = TCPSocket.new(host, port) - text_data.each_line do |line| - conn.print(line) + text_data.each_line do |l| + conn.print(l) end conn.shutdown(Socket::SHUT_WR) conn.read @@ -1666,8 +1666,8 @@ EOF sock.print("150 Here comes the directory listing.\r\n") begin conn = TCPSocket.new(host, port) - entry_lines.each do |line| - conn.print(line, "\r\n") + entry_lines.each do |l| + conn.print(l, "\r\n") end rescue Errno::EPIPE ensure