# File test/pseudo_io.rb, line 16
    def write(string)
      @closed and raise 'closed'
      if (@stream) then
        @stream << string
      else
        @stream = string.dup
      end

      @stream.length
    end