Sha256: 48ac695dd8588fb308869bf6e31b7e8917b79b69b5274b546b21d33b902e1d07
Contents?: true
Size: 640 Bytes
Versions: 15
Compression:
Stored size: 640 Bytes
Contents
# coding: utf-8 module Fig; end # This exists because standard Kernel#at_exit blocks don't get run before # Kernel#exec. class Fig::AtExit def self.add(&block) EXIT_PROCS << block return end def self.execute() EXIT_PROCS.each do |proc| begin proc.call() rescue StandardError => exception $stderr.puts( [ %q<Got exception from "at exit" processing.>, exception.message, exception.backtrace ].flatten.join("\n") ) end end return end private EXIT_PROCS = [] at_exit { Fig::AtExit.execute() } end
Version data entries
15 entries across 15 versions & 1 rubygems