It's called ophidiophobia, the fear of snakes. Safe to say Matt Cain does not have it.

Cain was the last pitcher to beat the Diamondbacks before they won nine in a row against the Giants. That streak ended with a 5-2 San Francisco win on Saturday night that was almost all Cain. He pitched, he slugged, he sent an Arizona infielder flying into the air, he did everything short of treat his own wound when he took a liner off his left shin.

"That was an old-school type of effort that Cain gave us," manager Bruce Bochy said. "He was determined, and he gave us a great effort, which we really needed."

Cain held Arizona to one run in six innings, his ERA dipping to 2.28.

More important, he singled to start one scoring rally, then gave his team that crushing two-out hit that had been so elusive, a two-run double off former Athletic Trevor Cahill that gave the Giants a 4-1 lead in the sixth.

Giants hitters rarely get two hits and two RBIs in the same game. Cain was only the 12th to do it this season. Melky Cabrera became the 13th with a pair of run-scoring doubles.