This quote at the end of Chapter 4 does show childish naivety, but it shows that Boo has a sense of humor more than it shows his compassion:
Atticus’s arrival was the second reason I wanted to quit the game. The first reason happened the day I rolled into the Radley front yard. Through all the head- shaking, quelling of nausea and Jem-yelling, I had heard another sound, so low I could not have heard it from the sidewalk. Someone inside the house was laughing.
While Scout, Jem, and Dill are playing outside, Boo is laughing on the inside. This is the first indication that Boo is aware of how the children perceive him. The fact that he chooses to laugh does show a compassionate side because he could have acted offended or angry.
In Chapter 17, Atticus guards the jail to protect Tom Robinson. A mob shows up demanding to let them get to Tom. Atticus refuses. The children have followed Atticus and they interrupt the confrontation between Atticus and the mob. Jem refuses to take Scout and Dill home. Scout tries to befriend Walter Cunningham, Sr. The children don't know for sure what they are doing. But something tells Jem, at least, that trouble is brewing. But it is Scout's naivety that saves them. Scout talks to Walter Sr. about Walter Jr., a boy in her class:
“He’s in my grade,” I said, “and he does right well. He’s a good boy,” I added, “a real nice boy. We brought him home for dinner one time. Maybe he told you about me, I beat him up one time but he was real nice about it. Tell him hey for me, won’t you?”
Walter Sr. then tells the mob to go home. Scout's naive efforts bring out compassion from Walter Cunningham Sr.