sync_close: This fix breakage from Ruby-trunk r50118