1 2 3 4 5
# When Kernel#exit is invoked, before exiting Ruby invokes any blocks # defined by Kernel#at_exit. at_exit { puts 'Last!' } exit