title: Understanding Ruby and OS I/O buffering
body: <p>How does IO buffering work in Ruby? How often is data flushed to the underlying stream when using the <code>IO</code> and <code>File</code> classes? How does this compare to OS buffering? What needs to be done to guarantee that given data has been written to disk, before confidently reading it back for processing?</p>