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: multi-irb.rb
    path of file: ./repos/artichoke/artichoke-backend/vendor/ruby/lib/irb/ext
    
    the code of the file until where you have to start completion: # frozen_string_literal: false
#
#   irb/multi-irb.rb - multiple irb module
#   	$Release Version: 0.9.6$
#   	$Revision$
#   	by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
fail CantShiftToMultiIrbMode unless defined?(Thread)

module IRB
  class JobMan
    
    def delete(key)
      case key
      when Integer
        fail NoSuchJob, key unless @jobs[key]
        @jobs[key] = nil
      else
        catch(:EXISTS) do
          @jobs.each_index do
            |i|
            if @jobs[i] and (@jobs[i][0] == key ||
                @jobs[i][1] == key ||
                @jobs[i][1].context.main.equal?(key))
              @jobs[i] = nil
              throw :EXISTS
            end
          end
          fail NoSuchJob, key
        end