From: Ryan Davis Date: 2003-07-22T05:11:26+09:00 Subject: Re: testunit, exit status and at_exit On Monday, July 21, 2003, at 12:51 PM, Nathaniel Talbott wrote: > Yukihiro Matsumoto [mailto:matz@ruby-lang.org] wrote: >> OK. But you need to help me to clarify the problem. What if >> there's multiple END proc that calls "exit"? Can I choose >> arbitrary one? > I was wondering if that would be a problem. For my situation, either > of the > following would work: > 1. The last exit status that is set wins. So if there are multiple > END > procs, and they all set the exit status (by calling #exit), the last > one > registered wins (END procs are called in the order they are defined, > correct?) > 2. Calling #exit in an END proc does nothing, but calling #exit! > immediately terminates with the given status (skipping any remaining > END > procs). I expect exit to do just that. I would want the first one hit to exit on the spot. Maybe we should add set_exit_code(n) or something similarly not confusing?