You should be ok, as long as it's not a really hard freeze. Depending on other conditions, there could be some damage, especially if the buds are heavy and get wet, not tied up or supported, could be some breakage.
It may not ruin it but it certainly can damage it. I've seen buds that went through a hard frost and the result was not pretty - they ended up very brown and funky. Looked like last years outdoor even though they had been freshly harvested.
Depends on the strain really...but if they are in a container their roots stand to be damaged which is the most vital thing to protect IMO when it comes to keeping the plants alive...some strains will take snow without issue and others will die from it just getting cold lol
I spent almost all last winter trying to kill some girls by neglect who I just couldn't keep inside anymore. They got snowed on, frosted, hard frost, still didn't die. They were all in 1gal nursery pots.