Ryan Howard began the eighth by reaching on an error by left-fielder Logan Morrison. Ben Francisco followed with a single off Ryan Webb (0-2), and Raul Ibanez put runners on the corners with a groundout. Ruiz followed with a soft fly to center.
Ryan Madson (1-0) tossed a scoreless eighth after taking over for Cole Hamels, and Jose Contreras survived a rocky ninth inning for his third save in as many chances.
The Phillies jumped ahead with two runs in the first off Anibal Sanchez. Placido Polanco hit a solo homer, and later had a single to make him 7 for 13 against Sanchez. Jimmy Rollins walked, stole second and advanced to third on catcher John Buck's throwing error, and Ibanez eventually made it 2-0 with a single up the middle.
Sanchez allowed only four more hits over six innings.
Hamels began by striking out six of the first 10 batters he faced, and the left-hander only surrendered two hits through the first five innings.
The Marlins finally broke through in the sixth, when Omar Infante began the inning with a double and Mike Stanton drove him in. Stanton went to third on a single by Gaby Sanchez and later scored on Morrison's sacrifice fly.
A crowd of 45,716 was the second-largest in the regular season in the eight-year history of Citizens Bank Park. It was the 131st consecutive regular-season sellout, and the Phillies improved to 72-26 in Sunday games since the stadium opened in 2004.
NOTES: Phillies RHP Roy Oswalt, who left Friday's game with lower back strain after six innings, is expected to make his next start Thursday in San Diego. He is scheduled to throw a bullpen session Monday. ... Marlins INF Donnie Murphy is expected to miss his second straight game with a bruised left knee. He fouled a ball off his kneecap in the ninth inning on Friday and couldn't finish the at-bat. ... Florida will start Josh Johnson after a day off Monday. Ricky Nolasco and Chris Volstad will wrap up the three-game series against the Pirates.