Yeah, there’s no law, so it’s perfectly acceptable.
There’s no law against farting on a subway with your ass one foot from someone sitting down, so that must be acceptable, too.
I’ve never been on a subway, but if someone is eating something on a public conveyance of some sort, it’s their business. As for passing gas, every flight I’ve been on has featured someone doing the dirty deed. I find that a lot more offensive than someone eating, but there’s little or nothing I can do about that either.