@@ -56,7 +56,7 @@ module HTTP
5656 ?body: untyped ,
5757 ?follow: bool | Hash[Symbol, untyped ],
5858 ?retriable: bool | Hash[Symbol, untyped ],
59- ?base_uri: String | URI | nil ,
59+ ?base_uri: String | URI? ,
6060 ?persistent: String?,
6161 ?ssl_context: OpenSSL::SSL::SSLContext?
6262 ) -> Response
@@ -118,7 +118,7 @@ module HTTP
118118 ?body: untyped ,
119119 ?follow: bool | Hash[Symbol, untyped ],
120120 ?retriable: bool | Hash[Symbol, untyped ],
121- ?base_uri: String | URI | nil ,
121+ ?base_uri: String | URI? ,
122122 ?persistent: String?,
123123 ?ssl_context: OpenSSL::SSL::SSLContext?
124124 ) -> Response
@@ -167,7 +167,7 @@ module HTTP
167167 ?body: untyped ,
168168 ?follow: bool | Hash[Symbol, untyped ],
169169 ?retriable: bool | Hash[Symbol, untyped ],
170- ?base_uri: String | URI | nil ,
170+ ?base_uri: String | URI? ,
171171 ?persistent: String?,
172172 ?ssl_context: OpenSSL::SSL::SSLContext?
173173 ) -> Response
@@ -222,11 +222,11 @@ module HTTP
222222 def delete : (String | Symbol name) -> void
223223 def add : (String | Symbol name, String | Array[String] value) -> void
224224 def get : (String | Symbol name) -> Array[String]
225- def [] : (String | Symbol name) -> (String | Array[String] | nil )
225+ def [] : (String | Symbol name) -> (String | Array[String]? )
226226 def include? : (String | Symbol name) -> bool
227- def to_h : () -> Hash[String, String | Array[String] | nil ]
227+ def to_h : () -> Hash[String, String | Array[String]? ]
228228 alias to_hash to_h
229- def deconstruct_keys : (Array[Symbol]? keys) -> Hash[Symbol, String | Array[String] | nil ]
229+ def deconstruct_keys : (Array[Symbol]? keys) -> Hash[Symbol, String | Array[String]? ]
230230 def to_a : () -> Array[Array[String]]
231231 def inspect : () -> String
232232 def keys : () -> Array[String]
@@ -491,7 +491,7 @@ module HTTP
491491 ?body: untyped ,
492492 ?follow: bool | Hash[Symbol, untyped ],
493493 ?retriable: bool | Hash[Symbol, untyped ],
494- ?base_uri: String | URI | nil ,
494+ ?base_uri: String | URI? ,
495495 ?persistent: String?,
496496 ?ssl_context: OpenSSL::SSL::SSLContext?
497497 ) -> void
@@ -501,7 +501,7 @@ module HTTP
501501
502502 def follow= : (bool value) -> void
503503 def retriable= : (bool value) -> void
504- def base_uri= : (String | URI | nil value) -> void
504+ def base_uri= : (String | URI? value) -> void
505505 def base_uri? : () -> bool
506506 def persistent= : (String? value) -> String?
507507 def persistent? : () -> bool
@@ -569,6 +569,7 @@ module HTTP
569569
570570 @raw_host: String?
571571 @hash: Integer
572+ self .@addressable_loaded: bool
572573 @scheme: String?
573574 @user: String?
574575 @password: String?
@@ -592,7 +593,7 @@ module HTTP
592593 HTTPS_SCHEME: String
593594 PERCENT_ENCODE: Regexp
594595 NEEDS_ADDRESSABLE: Regexp
595- DEFAULT_PORTS: Hash[String, Integer]
596+ DEFAULT_PORTS: Hash[String? , Integer]
596597 NORMALIZER: ^(String | URI) -> URI
597598
598599 DOT_SEGMENTS: Array[String]
@@ -632,6 +633,8 @@ module HTTP
632633 def self.parse_components : (String uri_string) -> Hash[Symbol, untyped ]
633634 def self.parse_with_stdlib : (String uri_string) -> Hash[Symbol, untyped ]?
634635 def self.parse_with_addressable : (String uri_string) -> Hash[Symbol, untyped ]
636+ def self.require_addressable : () -> void
637+ def self.idna_to_ascii : (String host) -> String
635638 end
636639
637640 # Supported HTTP method verbs
@@ -802,7 +805,7 @@ module HTTP
802805 def readpartial : (?Integer size, ?String? outbuf) -> String
803806 def connection : () -> Connection?
804807 def uri : () -> URI
805- def to_a : () -> [Integer, Hash[String, String | Array[String] | nil ], String]
808+ def to_a : () -> [Integer, Hash[String, String | Array[String]? ], String]
806809 alias deconstruct to_a
807810 def deconstruct_keys : (Array[Symbol]? keys) -> Hash[Symbol, Status | String | Headers | Body | Request?]
808811 def flush : () -> Response
0 commit comments