If you have the beverage in your hand, they will ask you to toss it before letting you on board.
Happened to me yesterday at ORD
- they have trashcans at the gate and made me dump the coffee I had snagged from the Crown Room. No problem though - I got another one the minute I boarded the aircraft.
If you have a bottle in your laptop bag, however, I'm not sure how that will detect that, unless they handsearch everyone at the gate. Don't try opening the bottle on board though - someone's likely to scream bloody murder!