In S.E. Hinton's novel The Outsiders, in chapter eleven, Ponyboy claims responsibility for the stabbing death of Bob during a conversation with Randy the Soc.
It is important to note that this conversation takes place after the rumble, and after Ponyboy has been sick for days. He has had a fever and been in bed delirious from Saturday night until Tuesday. Upon waking, Darry tells him he is suffering from exhaustion, shock, a mild concussion after being hit in the head at the rumble, and a fever. The shock is due to his witnessing the death of Dally and the knowledge that Johnny has also died. Ponyboy has a conversation with Randy in which Randy tells him that Ponyboy didn't have anything to do with Bob getting killed. Ponyboy denies this, and says:
"'I had it.' I stopped him. 'I had the knife. I killed Bob.' Randy shook his head. 'I saw it. You were almost drowned. It was the blackheaded guy that had the switchblade. Bob scared him into doing it. I saw it.'
I was bewildered. 'I killed him. I had a switchblade and I was scared they were going to beat me up.'
'No, kid, it was your friend, the one who died in the hospital....'
'Johnny is not dead.' My voice was shaking. 'Johnny is not dead.'"
Randy leaves Ponyboy's house confused. Darry warns him not to talk to Ponyboy about Johnny ever again. Ponyboy, the narrator of the novel, says:
"I swallowed hard and blinked. He was just like all the rest of the Socs. Cold-blooded mean. Johnny didn't have anything to do with Bob getting killed."
This false statement must be due to Ponyboy's altered mental state. The fever made him delirious. The concussion has caused him to be confused. The shock of the death of his two friends has left him unstable. He has likely forgotten the conversation he had with Randy before the rumble, in which some healing took place between them. He is holding on to stereotypes about the Socs again. Ponyboy probably also wants to protect his friend, Johnny and doesn't want people thinking badly of him, especially not a Soc. It is possible that Ponyboy has the events of the murder mixed up in his mind in his confused mental state.