Repository navigation
Tags
Tags
fix: explain missing callbacks in collection methods
Calling a collection method without its callback now gives a clear error.
items = [1, 2, 3]
items.filter()
Before: index 0 out of bounds (length 0)
After: .filter() requires a function argument
Works for arrays and hashes, including empty collections.
add signal module for graceful OS signal handling
New stdlib module: use "signal"
signal.on("INT", fn()
puts "shutting down"
exit(0)
end)
signal.wait()
Supports INT, TERM, HUP, QUIT, USR1, USR2, WINCH, PIPE, and ALRM.
Handlers are race-free — they run on the goroutine that calls
signal.wait(), so they never conflict with the rest of your program.
Functions:
signal.on(name, handler) — register a handler
signal.wait() — block and dispatch handlers as signals arrive
signal.reset(name) — stop invoking a handler
signal.ignore(name) — ignore a signal entirely
fix: cli module separates -- passthrough from positional args cli.args() now returns only the arguments before a "--" separator, and a new cli.passthrough() returns everything after it. This keeps a command's own arguments from being mixed up with arguments meant to be forwarded to another command.
PreviousNext