method

delete

v1_9_1_378 - Show latest stable - Class: IRB::JobManager
delete(key)
public

No documentation available.

# File lib/irb/ext/multi-irb.rb, line 86
    def delete(key)
      case key
      when Integer
        IRB.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
          IRB.fail NoSuchJob, key
        end
      end
      until assoc = @jobs.pop; end unless @jobs.empty?
      @jobs.push assoc
    end