End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Process::Status#to_i
stat.to_i → integer
process.c
View on GitHub ↗
static VALUE
pst_to_i(VALUE self)
{
int status = pst_status(self);
return RB_INT2NUM(status);
}
Returns the bits in stat as an Integer. Poking around in these bits is platform dependent.
Example
fork { exit 0xab } #=> 26566 Process.wait #=> 26566 sprintf('%04x', $?.to_i) #=> "ab00"