delete(key) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# 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
Register or log in to add new notes.