lib/httpx/altsvc.rb in httpx-0.6.3 vs lib/httpx/altsvc.rb in httpx-0.6.4

- old
+ new

@@ -65,10 +65,11 @@ alt_params = Hash[alt_params.map { |field| field.split("=") }] yield(parse_altsvc_origin(alt_origin), alt_params) end end + # :nocov: if RUBY_VERSION < "2.2" def parse_altsvc_origin(alt_origin) alt_proto, alt_origin = alt_origin.split("=") alt_origin = alt_origin[1..-2] if alt_origin.start_with?("\"") && alt_origin.end_with?("\"") if alt_origin.start_with?(":") @@ -85,7 +86,8 @@ alt_proto, alt_origin = alt_origin.split("=") alt_origin = alt_origin[1..-2] if alt_origin.start_with?("\"") && alt_origin.end_with?("\"") URI.parse("#{alt_proto}://#{alt_origin}") end end + # :nocov: end end