# File lib/html5/inputstream.rb, line 325
    def chars_until(characters, opposite=false)
      char_stack = [char]

      while char_stack.last != :EOF
        break unless (characters.include?(char_stack.last)) == opposite
        char_stack.push(char)
      end

      # Put the character stopped on back to the front of the queue
      # from where it came.
      c = char_stack.pop
      @queue.insert(0, c) unless c == :EOF
      return char_stack.join('')
    end