adhearsion/has-guarded-handlers — pull request #2 by christophersansone (2014-04-05 20:25:02+00:00)
Title: [BUGFIX] Always delete tmp handlers when called regardless of return value

I noticed a problem with #register_tmp_handler sometimes firing the same handler multiple times. The issue had to do with the return value: if falsy, it would re-execute. This also made it difficult to throw :pass, because it would then only remove the handler if subsequent handler was registered.

Also, presumably, the handler may have been deleted even if it was not actually called.

I simply changed the logic to delete the handler if it was marked as temporary and if it had been called, regardless of its return value.