Calif. court to rule on gay marriage ban