Peel the pineapple, cut in half lengthways and remove and discard the core. Cut each half across into eight slices, reserving any juice.
Melt the butter and brown sugar in a large, stainless-steel or enamel frying pan over moderate heat.
Peel the bananas, cut in half widthways, then lengthways.
Add the pineapple to the hot butter and sugar in the pan and cook over fairly high heat for 1–2 minutes, then add the bananas and cook for another 2–3 minutes, until heated through.
Pour the rum into the frying pan, heat for a few seconds, then stand well back and set alight with a match. Allow the rum to burn, shaking the pan very gently, until the flames die down. Pour any reserved pineapple juice into the pan and continue to heat the fruit for 1 minute.
Transfer the flambéed fruit to individual dishes and serve with whipped cream or ice cream.