Well, the idea was to be able to provide an available output stream that the formatter could use as needed without having to worry about whether it is actually a file stream per se and doing the normal things that that might entail, so block/ensure was out.

I *think*, if I understand the way ruby handles file closing/gc, it should clean up after itself anyway - the at_exit was a way that I've seen other libraries use to try to do a little helpful cleanup just in case so as not to leak file descriptors/memory.

That said, I don't know about potential unexpected results, and there may be better ways to handle. I can investigate.