ts wrote:
"L" == Laurent Julliard <Laurent.Julliard@xxxxxxxxxxxxxx> writes:
L> Are you aware of anyway to catch the end of a Ruby script execution when
L> there is no explicit exit instruction?
Something like this ?
pigeon% ruby -e 'at_exit { p "end" }'
"end"
pigeon%
at_exit is exactly what I was looking for. I combined this with aliasing
exit! to exit (at_exit doesn't catch exit!) in my ruby module and now I
catch all exit events whether they come from and explicit exit/exit! or
from an implicit exit
Thanks for the tip!
Laurent
|