LOL, many pups and even grown dogs do this.
JMO, before I'd run around the yard pouring tobasco sauce everywhere, I'd just pick it up.

Anyway, the pineapple is a new one on me. If you try feeding that to your baby and it works, let us know! Never know when I might need that info again.
We have used the stuff you get at the vet in the past, and it did work. Good news was that we only had to use it short term.