-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Charles Hixson wrote: | I want to have a class which occasionally updates a file, but I want to | ensure that it always flushes it's data to the file before the program | quits. Not quite sure if I really understand your problem, but I might offer some things to consider here: 1. stream.sync= true for enabling autoflush. Is this not possible ? This seems to be the simplest solution. 2. Use Ruby's block syntax to 'ensure' flush after update. 3. At exit of ruby program, all Files should be flushed anyhow, correct me on this if I am mistaken. best regards, kaspar semantics & semiotics code manufacture www.tua.ch/ruby -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBQCGkFifl4CA0ImQRArN9AKCoPSKxMYt276EOmI/XtNmwLkF5/wCdESTk in4wAn0tKmQxECSkRP5DX3o= =EnM7 -----END PGP SIGNATURE-----