[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Possible to unset at_exit?

Todd A. Jacobs

6/12/2007 2:50:00 AM

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.

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"

1 Answer

Nobuyoshi Nakada

6/12/2007 5:25:00 AM

0

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?

--
Nobu Nakada