diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-20 01:49:25 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-20 01:49:25 +0000 |
commit | c1af879dd7cbbf9702e545165ee1c14ab42edfec (patch) | |
tree | bb07d4ae768da24daaf89cc63a9de77bbb4ee31b /lib/net | |
parent | e3b8eb50fa3ececcbd3f851944b64e749484f5f8 (diff) | |
download | ruby-c1af879dd7cbbf9702e545165ee1c14ab42edfec.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/net')
-rw-r--r-- | lib/net/ftp.rb | 2 |
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 |