Issue #5700: io.FileIO() called flush() after closing the file.
flush() was not called in close() if closefd=False.
3 files changed