Skip to content

Commit ef2c69d

Browse files
authored
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.
1 parent 516db77 commit ef2c69d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sig/server.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module WEBrick
3030

3131
def listen: (String address, Integer port) -> void
3232

33-
def start: () { (TCPSocket) -> void } -> void
33+
def start: () ?{ (TCPSocket) -> void } -> void
3434

3535
def stop: () -> void
3636

@@ -42,7 +42,7 @@ module WEBrick
4242

4343
def accept_client: (TCPServer svr) -> TCPSocket?
4444

45-
def start_thread: (TCPSocket sock) { (TCPSocket) -> void } -> Thread
45+
def start_thread: (TCPSocket sock) ?{ (TCPSocket) -> void } -> Thread
4646

4747
def call_callback: (Symbol callback_name, *untyped args) -> untyped
4848

0 commit comments

Comments
 (0)