You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: trap_chain.rb
    path of file: ./repos/facets/lib/core/facets/kernel
    
    the code of the file until where you have to start completion: module Kernel
  # Calling Kernel#trap() by itself will replace any previously registered
  # handler code. Kernel#trap_chain(), on the oth
    
  def trap_chain(signal_name, *args, &block)
    previous_interrupt_handler = trap(signal_name, *args) {}
    trap(signal_name, *args) do
      block.call
      previous_interrupt_handler.call unless previous_interrupt_handler == "DEFAULT"
    end
  end