Cumpton allowed just two hits, walked two and struck out four, helping the Pirates take the last two games of their weekend series in Chicago. The 25-year-old Cumpton (3-2) improved to 3-0 with a 3.09 ERA in four starts this month.

"Rookie or whatever you call it, this dude, he comes in every time and he battles," Pirates second baseman Josh Harrison said. "He is a warrior. He is out there and he is going to grind. He does just that."

Cumpton (3-2) retired 13 of his first 14 batters. He walked Nate Schierholtz in the fifth inning, but rebounded by getting John Baker to hit into an inning-ending double play.

"I really didn't know what my pitch count was until I got done," he said. "I felt like I threw a lot more than I did. Later on, I started to fall behind guys. I tried not to shy away from my strengths and when I got behind guys 1-0 I tried to go back and attack them with fastballs and they put them in play for me and the guys made plays behind me today."

Anthony Rizzo and Starlin Castro started the Cubs ninth with consecutive singles, putting runners on the corners. Melancon then struck out Luis Valbuena and got Schierholtz to hit into a fielder's choice that drove in Rizzo. Junior Lake flied out to right to end the game.

Pirates phenom Gregory Polanco went 0 for 3 with a walk, ending his career-opening hitting streak at 11 games.

Hammel (6-5) allowed two runs and six hits in seven innings. He struck out six and walked one.

Hammel's first pitch of the third inning was hit over the center-field wall by Snider. It was Snider's fourth homer of the season.

"Snider sees me well, I guess," Hammel said. "It was a bad pitch, supposed to be a two-seamer, kind of a hip shot over the inside corner, but it ran back over the plate. He obviously got it pretty good."

Hammel is 2-2 with a 3.51 ERA in four starts this season against Pittsburgh.

"I can honestly say I'm sick of facing the Pirates," he said. "Four series now and four out of four with them, so I'd like to see some different colors for sure. I'm sure they're tired of seeing me, too. Obviously, 2-1, just a good baseball game."

Later in the third, Harrison hit a comebacker that ricocheted off Hammel's right side and allowed Chris Stewart to score from third. Harrison reached first without a throw, and Hammel was briefly looked at by a team trainer.

"To get Ruggiano, he threw him an 0-1 changeup last night for a called strike. I don't think he liked the call. Maybe in the back in his mind he was looking for the changeup again," Pirates manager Clint Hurdle said. "(Watson) kept pumping fastballs. He's got a good fastball. It's live."

Game notes

Cubs OF Emilio Bonifacio has yet to return to baseball activities after being placed on the disabled list on June 13 with a rib injury. "We're still in the wait-and-see," manager Rick Renteria said. "He's feeling better, he's not feeling any discomfort anymore." Renteria added that this type of injury can become chronic if not taken care of properly, so the Cubs are being patient to make sure Bonifacio is recovered before returning to the active roster. ... Pirates 2B Neil Walker is expected to join the team in Tampa Bay on Monday. He has been on the DL since June 9 due to an appendectomy. He is eligible to be reinstated on Tuesday. ... Pirates OF Starling Marte is expected to rejoin the club in Tampa on Monday. He is attending to a personal matter in the Dominican Republic. ... Before the game, the Cubs activated Castillo off the DL. He missed 18 games with a rib cage injury.