New York enacted a law prohibiting smokeless tobacco for regular-season games on Wednesday, and it took effect immediately, before the Yankees were to host the Astros.