Given the following context

We saw a boy trying to leap a pony over a gate; the pony would not take the leap, and the boy cut him with the whip, but *he* only turned to one side.

Are "pony" and "he" the same?
yes