A same-sex couple who held a commitment ceremony but broke up years before New York state legalized gay marriage never formally divorced in the eyes of the law, a judge has ruled.

And because the couple never divorced, Manhattan Surrogate Nora Anderson reasoned, the bequest one man made to his former partner in an estate with assets worth more than $1 million was not voided by state laws that disqualify inheritance to a divorced spouse.