diff --git a/.travis.yml b/.travis.yml index 21ab797..a196efa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,7 @@ rvm: - 2.1.10 - 2.2.5 - 2.3.1 +- 2.4.6 +- 2.5.5 +- 2.6.2 script: rake travis diff --git a/test/test_net_http_persistent.rb b/test/test_net_http_persistent.rb index fa64570..f80d3c8 100644 --- a/test/test_net_http_persistent.rb +++ b/test/test_net_http_persistent.rb @@ -120,7 +120,7 @@ def proxy_port def basic_connection raise "#{@uri} is not HTTP" unless @uri.scheme.downcase == 'http' - net_http_args = [@uri.host, @uri.port] + net_http_args = [@uri.hostname, @uri.port] connection = Net::HTTP::Persistent::Connection.allocate connection.ssl_generation = @http.ssl_generation @@ -152,7 +152,7 @@ def r.read_body() :read_body end def ssl_connection raise "#{@uri} is not HTTPS" unless @uri.scheme.downcase == 'https' - net_http_args = [@uri.host, @uri.port] + net_http_args = [@uri.hostname, @uri.port] connection = Net::HTTP::Persistent::Connection.allocate connection.ssl_generation = @http.ssl_generation @@ -751,7 +751,7 @@ def test_pipeline skip 'net-http-pipeline not installed' unless defined?(Net::HTTP::Pipeline) cached = basic_connection - cached.start + cached.http.start requests = [ Net::HTTP::Get.new((@uri + '1').request_uri),