diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 502783955b..d22fe19746 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -996,7 +996,6 @@ module Net else raise FTPProtoError, resp end - return host, port end private :parse228 diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb index 6e79bb9c2e..b51034c7ea 100644 --- a/lib/net/http/generic_request.rb +++ b/lib/net/http/generic_request.rb @@ -282,7 +282,7 @@ class Net::HTTPGenericRequest def quote_string(str, charset) str = str.encode(charset, fallback:->(c){'&#%d;'%c.encode("UTF-8").ord}) if charset - str = str.gsub(/[\\"]/, '\\\\\&') + str.gsub(/[\\"]/, '\\\\\&') end def flush_buffer(out, buf, chunked_p)