Skip to content

Commit

Permalink
Block of server.start is optional (#155)
Browse files Browse the repository at this point in the history
Fix `[error] The method cannot be called without a block`
`Diagnostic ID: Ruby::RequiredBlockMissing` in Usage of README.
  • Loading branch information
znz authored Nov 5, 2024
1 parent 516db77 commit ef2c69d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sig/server.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit ef2c69d

Please sign in to comment.