Comment Comment by stbenjam Ruby example is not very idiomatic. Give File.open a block and it'll handle closing it. Instead of flushing the file every time, you could just set file.sync = true once.Also, if one was going to use the ensure block, use nil? not '== nil' parent stbenjam 11 years ago
Also, if one was going to use the ensure block, use nil? not '== nil'