From: Paul Brannan Date: 2002-03-09T11:39:55+09:00 Subject: Re: file closing On Sat, Mar 09, 2002 at 08:33:03AM +0900, Yohanes Santoso wrote: > 1. How about Kernel#at_exit? Register the object in some global place > and then clean up that object at exit time. If you think this is too > C-ish, consider the next alternative. A finalizer will work as well as or better than at_exit, since the GC is invoked when Ruby exits.