Ruggiano delivered a solo shot in the first inning, putting the Marlins ahead to stay, and added a two-run blast in the ninth to conclude the scoring as Miami took three-of-four games in its series against the Giants.
Eovaldi (1-0), making just his second start of the season since returning from a shoulder injury, held San Francisco to two runs on four hits over six innings, walking two and striking out seven.
The Marlins' bullpen protected a 3-2 lead for two innings before Miami erupted for four runs in the ninth to put the contest away.
Matt Cain (5-4) coughed up three runs on six hits over six innings.
Hunter Pence belted a solo homer for the Giants.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need