Mass. inmate sex-change ruling praised, condemned