From: Zachary Scott Date: 2012-01-14T08:12:36+09:00 Subject: Re: at_exit handling I wrote a gist not too long ago that seems appropriate here: https://gist.github.com/1603702 On Fri, Jan 13, 2012 at 3:09 PM, Ryan Davis wrote: > > On Jan 12, 2012, at 14:44 , Marc Heiler wrote: > >> Then suddenly one day, I required some files, one of which used at_exit, >> and I had a weird bug in that the exiting no longer worked as-is, >> instead it raised some SystemExit exception. >> >> This confused me a lot because that should not happen at all ever. > > It should happen always, regardless of at_exit: > > begin >  exit 1 > rescue SystemExit => e >  p e > end > > # => # > >