module Magick

def trace_proc=(p)

remove reference to the proc at exit
def trace_proc=(p)
   if @trace_proc.nil? && !p.nil? && !@exit_block_set_up
      at_exit { @trace_proc = nil }
      @exit_block_set_up = true
   end
   @trace_proc = p
end