Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Process::Status#to_s
() -> ::String
to_s → string
process.c
View on GitHub ↗
static VALUE
pst_to_s(VALUE st)
{
rb_pid_t pid;
int status;
VALUE str;
pid = pst_pid(st);
status = PST2INT(st);
str = rb_str_buf_new(0);
pst_message(str, pid, status);
return str;
}
Returns a string representation of self:
Example
`cat /nop` $?.to_s # => "pid 1262141 exit 1"