Interesting... What form was the pineapple, fresh or canned? And could it have had any skin left on it? How does it smell? If it doesn't smell foul and there isn't any visible spoilage then I would probably use it, just make sure you boil it long enough to make sure that any pathogens/spoilage organisms are destroyed. This is kinda funny though, it's a perfect example of how brewing started, wild fermentation!