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#>>
stat >> num → integer
process.c
View on GitHub ↗
static VALUE
pst_rshift(VALUE st1, VALUE st2)
{
int status = PST2INT(st1) >> NUM2INT(st2);
return INT2NUM(status);
}
Shift the bits in stat right num places.
Example
fork { exit 99 } #=> 26563 Process.wait #=> 26563 $?.to_i #=> 25344 $? >> 8 #=> 99