test ruby client: ensure flushing output data in child

It reduces random test failure a bit...