From 1ce65bd1c192b00b676dfabeac99c7735c278b03 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 24 Jan 2025 12:17:26 +0900 Subject: [PATCH] Add positional hash parameter --- stdlib/net-http/0/net-http.rbs | 4 ++-- test/stdlib/Net_HTTP_test.rb | 7 ++++++- test/typecheck/net_http/Steepfile | 8 ++++++++ test/typecheck/net_http/start.rb | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 test/typecheck/net_http/Steepfile create mode 100644 test/typecheck/net_http/start.rb diff --git a/stdlib/net-http/0/net-http.rbs b/stdlib/net-http/0/net-http.rbs index 8a31fd4b5..3d017b603 100644 --- a/stdlib/net-http/0/net-http.rbs +++ b/stdlib/net-http/0/net-http.rbs @@ -978,8 +978,8 @@ module Net # Note: If `port` is `nil` and `opts[:use_ssl]` is a truthy value, the value # passed to `new` is Net::HTTP.https_default_port, not `port`. # - def self.start: (String address, ?Integer? port, ?String | :ENV | nil p_addr, ?Integer? p_port, ?String? p_user, ?String? p_pass, **untyped opt) -> Net::HTTP - | [T] (String address, ?Integer? port, ?String | :ENV | nil p_addr, ?Integer? p_port, ?String? p_user, ?String? p_pass, **untyped opt) { (Net::HTTP) -> T } -> T + def self.start: (String address, ?Integer? port, ?String | :ENV | nil p_addr, ?Integer? p_port, ?String? p_user, ?String? p_pass, ?Hash[Symbol, untyped]?, **untyped opt) -> Net::HTTP + | [T] (String address, ?Integer? port, ?String | :ENV | nil p_addr, ?Integer? p_port, ?String? p_user, ?String? p_pass, ?Hash[Symbol, untyped]?, **untyped opt) { (Net::HTTP) -> T } -> T #