End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Process::Status#success?
stat.success? → true, false or nil
process.c
View on GitHub ↗
static VALUE
pst_success_p(VALUE st)
{
int status = PST2INT(st);
if (!WIFEXITED(status))
return Qnil;
return RBOOL(WEXITSTATUS(status) == EXIT_SUCCESS);
}
Returns true if stat is successful, false if not. Returns nil if exited? is not true.