Answer:
Ponyboy initially views Randy as a typical "Soc" (a rich, preppy teen from the West side of town), an enemy of the greasers and someone who is always looking for a fight. After Bob's death, however, Ponyboy is surprised to find that Randy is actually against the fighting between the Socs and the greasers and does not want to take part in it. Ponyboy is surprised and impressed by Randy's willingness to take a stand against the violence, and realizes that he has been wrong about Randy's character. This is an example of situational irony, as Ponyboy's initial assumptions about Randy turn out to be completely wrong.