From ef2c69d0653aad2a25a287c7d55861b89d45148b Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Tue, 5 Nov 2024 12:58:20 +0900 Subject: [PATCH] Block of server.start is optional (#155) Fix `[error] The method cannot be called without a block` `Diagnostic ID: Ruby::RequiredBlockMissing` in Usage of README. --- sig/server.rbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sig/server.rbs b/sig/server.rbs index 2565680..74db11f 100644 --- a/sig/server.rbs +++ b/sig/server.rbs @@ -30,7 +30,7 @@ module WEBrick def listen: (String address, Integer port) -> void - def start: () { (TCPSocket) -> void } -> void + def start: () ?{ (TCPSocket) -> void } -> void def stop: () -> void @@ -42,7 +42,7 @@ module WEBrick def accept_client: (TCPServer svr) -> TCPSocket? - def start_thread: (TCPSocket sock) { (TCPSocket) -> void } -> Thread + def start_thread: (TCPSocket sock) ?{ (TCPSocket) -> void } -> Thread def call_callback: (Symbol callback_name, *untyped args) -> untyped