Tag Archives: at_exit ruby

Installing Atexit Handlers On Module Load Considered Harmful

A common idiom in Ruby testing frameworks is the use of at_exit as a way to schedule interesting work. I am not a fan — it is an idiom that is ripe for abuse. The C library’s atexit(3) function that inspired Ruby’s at_exit function was originally intended to allow the registration of handlers to tear […]

Leave a comment