Possible to unset at_exit?


#1

Is it possible to unset an at_exit proc? Currently, I’m calling exit! in
order to bypass defined exit handlers, but it seems like there should be
a better way, such as unsetting specific procs that I may not want to
run at exit because of some runtime condition.


#2

Hi,

At Tue, 12 Jun 2007 11:50:27 +0900,
Todd A. Jacobs wrote in [ruby-talk:255247]:

Is it possible to unset an at_exit proc? Currently, I’m calling exit! in
order to bypass defined exit handlers, but it seems like there should be
a better way, such as unsetting specific procs that I may not want to
run at exit because of some runtime condition.

Currently, no.

Can’t you check the condition inside the proc?