ruby-changes:73655
From: Koichi <ko1@a...>
Date: Wed, 21 Sep 2022 15:21:41 +0900 (JST)
Subject: [ruby-changes:73655] e3b178066b (master): [DOC] Tweak the doc for `Process.kill` signature
https://git.ruby-lang.org/ruby.git/commit/?id=e3b178066b From e3b178066b6ec6c2f4f6e038c303cc50db35cf3d Mon Sep 17 00:00:00 2001 From: Koichi ITO <koic.ito@g...> Date: Mon, 23 May 2022 16:40:15 +0900 Subject: [DOC] Tweak the doc for `Process.kill` signature Replacing `...` with `*pids` seems to clarify the expected variadic arguments. Note that the expected arguments are two or more with a signal and pids. That is, the method must have at least one pid, which cannot be omitted: ```console % ruby -e 'Process.kill(0)' -e:1:in `kill': wrong number of arguments (given 1, expected 2+) (ArgumentError) from -e:1:in `<main>' ``` --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.c b/process.c index 735dd2d855..cb0a0bc542 100644 --- a/process.c +++ b/process.c @@ -8722,7 +8722,7 @@ get_PROCESS_ID(ID _x, VALUE *_y) https://github.com/ruby/ruby/blob/trunk/process.c#L8722 /* * call-seq: - * Process.kill(signal, pid, ...) -> integer + * Process.kill(signal, pid, *pids) -> integer * * Sends the given signal to the specified process id(s) if _pid_ is positive. * If _pid_ is zero, _signal_ is sent to all processes whose group ID is equal -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/