Method: Process::Status#to_s
- Defined in:
- process.c
#to_s ⇒ String
Show pid and exit status as a string.
system("false")
p $?.to_s #=> "pid 12766 exit 1"
462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'process.c', line 462
static VALUE
pst_to_s(VALUE st)
{
rb_pid_t pid;
int status;
VALUE str;
pid = NUM2PIDT(pst_pid(st));
status = PST2INT(st);
str = rb_str_buf_new(0);
pst_message(str, pid, status);
return str;
}
|