From: Logan Capaldo Date: 2006-04-08T10:40:56+09:00 Subject: Re: Rake: Making "cleanup" task --Apple-Mail-32-797011668 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Apr 7, 2006, at 9:10 PM, Eric Armstrong wrote: > That's looking like a cool solution. What is that > at_exit thing, btw? Is that a standard part of rake > I should know about? at_exit is a standard part of ruby % ri at_exit --------------------------------------------------------- Kernel#at_exit at_exit { block } -> proc ------------------------------------------------------------------------ Converts block to a Proc object (and therefore binds it at the point of call) and registers it for execution when the program exits. If multiple handlers are registered, they are executed in reverse order of registration. def do_at_exit(str1) at_exit { print str1 } end at_exit { puts "cruel world" } do_at_exit("goodbye ") exit produces: goodbye cruel world --Apple-Mail-32-797011668--