Court permits husbands to take on wives surnames: The ruling comes after two couples challenged the law