runtime/status_wait_no_parens.rb
tests/_examples/runtime/status_wait_no_parens.rb in the metorex repository.
# Process::Status.wait answers a child's status and leaves $? alone.
p Process::Status.wait.pid
pid = Process.spawn("true")
status = Process::Status.wait
p status.pid == pid
p status.class
p $?.nil?
Output:
-1
true
Process::Status
true