Yup, rice too. Because rice is a good source of carbohydrates and carbohydrates cause weight gain. Bananas are a fast digesting carbohydrate, if I'm not mistaken, so they aren't as bad as things like brown rice or potatoes, but they still cause weight gain.
Here is a link to a hardgainers...