The rule in question is:

The game ends in the bottom of the 9th or any later inning with the home team winning when the winning run scores before three are out. The only exception is when the batter hits a home run, he is credited with a home run and all runners on base score.

Prior to 1920, the game ended when the winning run scored, and the batter was credited only with the number of bases that were needed to score the run.