The Supreme Court on Friday ruled in favor of a 1994 ban on firearms for people under restraining orders to stay away from their spouses or partners.