B.C.
If it were some kind of food poison, then everyone who had some, even a little, would be sick in some way too. A stomach does not throw up selectively (only the beans portion) as far as I know.
It could be he had a mild stomach bug (I've been the one to get rota-virus about once every 10 years while the rest of the family is fine (we all eat the same foods) - one bout of throwing up/diarrhea and I'm done for another 10 years).
There are lots of reasons for a stomach to be off every once in awhile.
As long as it doesn't last a long time (chance of becoming dehydrated), have a fever or have other lingering symptoms, I wouldn't worry.