class IO::Stream::Generic

def close

Best effort to flush any unwritten data, and then close the underling IO.
def close
	return if closed?
	
	begin
		flush
	rescue
		# We really can't do anything here unless we want #close to raise exceptions.
	ensure
		self.sysclose
	end
end