The contract extension includes an option in the fourth year of $5 million, a $500,000 buyout and bump ups based on his performance.
Ruiz, 31, batted .255 with 43 RBIS and nine homers -- a career high -- in 2009.
So now the Phillies have signed deals with all four of their players who were eligible for arbitration.
Shane Victorino got $22 million on a three-year extension.
Reliever Chad Durbin and the Phils agreed to one more year worth $2.125 million.