Judge rules against same-sex adoption ban