# Possible to unset at\_exit?

**URL:** <https://www.ruby-forum.com/t/possible-to-unset-at-exit/106575>\
**Category:** Ruby\
**Created:** [June 12, 2007, 4:51am UTC](https://www.ruby-forum.com/t/possible-to-unset-at-exit/106575 "2007-06-12T04:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd\_ASJacobs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f17d59/32.png) [@Todd\_ASJacobs](https://www.ruby-forum.com/u/Todd_ASJacobs)\
**Post date:** [June 12, 2007, 4:51am UTC](https://www.ruby-forum.com/t/possible-to-unset-at-exit/106575/1 "2007-06-12T04:51:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Todd\_ASJacobs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f17d59/32.png) [@Todd\_ASJacobs](https://www.ruby-forum.com/u/Todd_ASJacobs)\
**Post date:** [June 12, 2007, 7:26am UTC](https://www.ruby-forum.com/t/possible-to-unset-at-exit/106575/2 "2007-06-12T07:26:36Z")

</div>

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?
