In Book 4, Chapter 8, Gollum leads Frodo and Samwise up the Stairs of Cirith Ungol, telling the Hobbits that it is the safest passage into Mordor. Gollum secretly plots to send the Hobbits to their demise, to be eaten by the evil spider Shelob who lives at the top of the stair. As Gollum leads the Hobbits up the stairs, his nefarious dialogue foreshadows the coming attack:
'Hobbits have climbed the Straight Stair. Next comes the Winding Stair.’
‘And what after that?’ said Sam.
‘We shall see,’ said Gollum softly. ‘O yes, we shall see!’
‘I thought you said there was a tunnel,’ said Sam. ‘Isn’t there a tunnel or something to go through?’
‘O yes, there’s a tunnel,’ said Gollum. ‘But hobbits can rest before they try that. If they get through that, they’ll be nearly at the top. Very nearly, if they get through. O yes!’
Gollum's plot to send Frodo and Sam to be eaten by the spider is not all that well hidden. Gollum's glee is what really gives it away. Gollum's giddy "We shall see" makes it quite clear that something out of the ordinary is ahead that he does not want to reveal to the Hobbits. Frodo and Sam might have noticed Gollum's qualifier, "if they get through," as an indication that there will be serious danger in the tunnel. Yet they keep following Gollum's lead anyway, due to the trust in him they were forced to develop over the course of their travels in Book 4.