diff --git a/stdlib/cgi/0/core.rbs b/stdlib/cgi/0/core.rbs index aea53b09a..4fbeec26c 100644 --- a/stdlib/cgi/0/core.rbs +++ b/stdlib/cgi/0/core.rbs @@ -273,6 +273,12 @@ class CGI extend CGI::Util + type options_hash = { + ?accept_charset: String, + ?tag_maker: String, + ?max_multipart_length: Integer | ^() -> Integer + } + # # The base exception for JSON errors. diff --git a/stdlib/net-http/0/net-http.rbs b/stdlib/net-http/0/net-http.rbs index ad3732c75..8ef6e38d2 100644 --- a/stdlib/net-http/0/net-http.rbs +++ b/stdlib/net-http/0/net-http.rbs @@ -913,6 +913,27 @@ module Net # def self.https_default_port: () -> Integer + type start_options = { + ?ca_file: String, + ?ca_path: String, + ?cert: OpenSSL::X509::Certificate, + ?cert_store: X509::Store, + ?ciphers: Array[String], + ?close_on_empty_response: bool, + ?ipaddr: String, + ?keep_alive_timeout: Numeric, + ?key: OpenSSL::PKey::PKey, + ?open_timeout: Numeric, + ?read_timeout: Numeric, + ?ssl_timeout: Numeric, + ?ssl_version: OpenSSL::SSL::tls_version, + ?use_ssl: bool, + ?verify_callback: ^(bool preverify_ok, StoreContext store_ctx) -> boolish, + ?verify_depth: Integer, + ?verify_mode: OpenSSL::SSL::verify_mode, + ?write_timeout: Numeric + } + # # An Enumerable of Strings. Each String represents a protocol to be advertised @@ -8195,7 +8235,7 @@ module OpenSSL # # ctx.npn_protocols = ["http/1.1", "spdy/2"] # - def npn_protocols=: (untyped) -> untyped + def npn_protocols=: (Array[String]? protos) -> Array[String] # # A callback invoked on the client side when the client needs to select a @@ -8213,7 +8253,7 @@ module OpenSSL # protocols.first # end # - def npn_select_cb: () -> untyped + def npn_select_cb: () -> (^(Array[String]) -> String? | nil) # # A callback invoked on the client side when the client needs to select a @@ -8231,7 +8271,7 @@ module OpenSSL # protocols.first # end # - def npn_select_cb=: (untyped) -> untyped + def npn_select_cb=: (^(Array[String]) -> String? alpn_select_callback) -> void # # A callback invoked on a server when a session is proposed by the client but @@ -8504,7 +8557,7 @@ module OpenSSL # If the verify_mode is not VERIFY_NONE and ca_file, ca_path and cert_store are # not set then the system default certificate store is used. # - def set_params: (?untyped params) -> untyped + def set_params: (context_params params) -> untyped # diff --git a/stdlib/uri/0/file.rbs b/stdlib/uri/0/file.rbs index 2579819de..95ebc4a5d 100644 --- a/stdlib/uri/0/file.rbs +++ b/stdlib/uri/0/file.rbs @@ -4,6 +4,10 @@ module URI # The "file" URI is defined by RFC8089. # class File < Generic + type build_opts = { + ?host: String?, + ?path: String? + } # # A Default port of nil for URI::File. # @@ -47,7 +51,7 @@ module URI # uri3.to_s # => "file:///path/my%20file.txt" # def self.build: (Array[String] args) -> URI::File - | ({ host: String?, path: String? }) -> URI::File + | (build_opts args) -> URI::File # # A Default port of nil for URI::Generic. # @@ -153,8 +165,8 @@ module URI # URI::Generic::build. But, if exception URI::InvalidComponentError is raised, # then it does URI::Escape.escape all URI components and tries again. # - def self.build2: (Array[nil | String | Integer]) -> URI::Generic - | ({ scheme: String?, userinfo: String?, host: String?, port: Integer?, registry: String?, path: String?, opaque: String?, query: String?, fragment: String? }) -> instance + def self.build2: (Array[nil | String | Integer] args) -> URI::Generic + | (build_opts args) -> instance # # A Default port of 80 for URI::HTTP. # @@ -46,7 +55,7 @@ module URI # URIs as per RFC 1738. # def self.build: (Array[String | Integer] args) -> instance - | ({ userinfo: String?, host: String?, port: Integer?, path: String?, query: String?, fragment: String? }) -> instance + | (build_opts args) -> instance # # A Default port of 389 for URI::LDAP. # @@ -50,7 +60,7 @@ module URI # "/dc=example;dc=com", "query", nil, nil, nil]) # def self.build: (Array[nil | String | Integer] args) -> URI::LDAP - | ({ host: String?, port: Integer?, dn: String?, attributes: String?, scope: String?, filter: String?, extensions: String? }) -> URI::LDAP + | (build_opts args) -> URI::LDAP # # E-mail headers set by the URL, as an Array of Arrays.