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#&
stat & num → integer
process.c
View on GitHub ↗
static VALUE
pst_bitand(VALUE st1, VALUE st2)
{
int status = PST2INT(st1) & NUM2INT(st2);
return INT2NUM(status);
}
Logical AND of the bits in stat with num.
Example
fork { exit 0x37 } Process.wait sprintf('%04x', $?.to_i) #=> "3700" sprintf('%04x', $? & 0x1e00) #=> "1600"