The man made a mistake from onset. What's wrong to tell your partner that you do gamble, at least in the early stage of the relationship, she will consider if she will cope with it or end it. At the same time, I dont think it is wise to end a strong relationship because you find out that your partner is a gambler. Things like that can be fixed, highest she demand for change which will come in due time.
Both of them have made a mistake. One failed to communicate while the other acted impulsively.
Actually the made a very big mistake, at least he would have open up to her earlier that he is a gambler. Because sometimes there is how you would talk to your partner about something you are into before you meant her, she would just understand then give you some advice to do it in a responsible way rather hiding such thing for her. Even though gambling in that matter, noing fully well that most of the partners normally forbid anything gambling because they see it as something that is only made for inresponsible people.