The Dodgers avoided a series sweep Thursday by beating Giants ace Madison Bumgarner, 2-1, behind seven scoreless innings from Hyun-Jin Ryu.