summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-20 01:49:25 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-20 01:49:25 +0000
commitfb8628ecda28227d000f006cc17d4bddbc67f97e (patch)
treebb07d4ae768da24daaf89cc63a9de77bbb4ee31b /lib
parentf0dd33d5498f16acdaa6e96edf0a3707ff963bbc (diff)
downloadruby-fb8628ecda28227d000f006cc17d4bddbc67f97e.tar.gz
remote_address should be called on @bare_sock.
Because @sock.remote_address fails if @sock is an SSLSocket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/ftp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index b3ebaf68af..2e55222fbf 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -1362,7 +1362,7 @@ module Net
raise FTPReplyError, resp
end
if m = /\((?<d>[!-~])\k<d>\k<d>(?<port>\d+)\k<d>\)/.match(resp)
- return @sock.remote_address.ip_address, m["port"].to_i
+ return @bare_sock.remote_address.ip_address, m["port"].to_i
else
raise FTPProtoError, resp
end