def pop_discard_buffer
      raise Shells::NotRunning unless running?
      # a standard pop discarding current data and retrieving the history.
      debug 'Discarding buffer <<'
      sync do
        hist_stdout, hist_stderr, hist_output = (output_stack.pop || [])
        self.stdout = hist_stdout || ''
        self.stderr = hist_stderr || ''
        self.output = hist_output || ''
      end
    end
def pop_discard_buffer
      raise Shells::NotRunning unless running?
      # a standard pop discarding current data and retrieving the history.
      debug 'Discarding buffer <<'
      sync do
        hist_stdout, hist_stderr, hist_output = (output_stack.pop || [])
        self.stdout = hist_stdout || ''
        self.stderr = hist_stderr || ''
        self.output = hist_output || ''
      end
    end
Pops the buffers and discards the captured output.

 This method is used internally in the +get_exit_code+ method, but there may be legitimate use
 cases outside of that method as well.