From: zdennis Date: 2006-04-08T03:07:54+09:00 Subject: Re: Rake: Making "cleanup" task Austin Ziegler wrote: > On 4/7/06, Pistos Christou wrote: >> Eric Armstrong wrote: >>>> Jim Weirich wrote: >>> >>> Is this possible? If so, how? :) >>> >>> >>> Rake is just executing a ruby script, right? >>> >>> So what's wrong with coding an END block >>> at the end of the script? >>> (he asked, not yet having tried it, but >>> wondering why it wouldn't work) >> Could you show some example code? I've never heard of this "END block" >> thing. I thought __END__ in Perl made the interpreter stop and ignore >> everything below that line. > > It does. > > However, that's not what Eric is talking about. > > He's talking about: > > END { > # put your cleanup code here > } Which I think you implicitly confirm this Austin, but don't say so... ruby does support the END { ... } that Austin posted above.. just to be a little bit more explicit Zach