Ruby 3.x compatibility
Ruby 3 was already working, but the tests were failing due to $CHILD_STATUS being frozen and rspec couldn't proxy this. The $CHILD_STATUS, which returns the Process::Status for the scan, has been extracted to a class method so it could be mocked.