lib/excon/addressable/parser.rb in excon-addressable-0.4.0 vs lib/excon/addressable/parser.rb in excon-addressable-0.4.1

- old
+ new

@@ -7,12 +7,12 @@ # Parses a url using `Addressable`, setting the port to the inferred_port. # # @see : https://github.com/excon/excon/issues/384#issuecomment-42645517 # @see : https://github.com/excon/excon/issues/384#issuecomment-362618298 # - class Parser + class Parser < ::Addressable::URI def self.parse(url) - uri = ::Addressable::URI.parse(url) + uri = super uri.port = uri.inferred_port unless uri.port uri end end end