Sha256: 4b7ba125e93b46a9f539bd21691048e2365b554bbed2c80bd26884364a833e1f
Contents?: true
Size: 623 Bytes
Versions: 45
Compression:
Stored size: 623 Bytes
Contents
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
45 entries across 45 versions & 1 rubygems