ARLINGTON, Texas -- Arizona rookie Robbie Ray took a shutout into the eighth inning to outpitch Texas' Yovani Gallardo, and the Diamondbacks beat the Rangers 4-2 on Tuesday night.
Ray (3-4) pitched four-hit ball with one walk over a career-high 7 2/3 innings. He didn't give up a hit until Elvis Andrus' single with two outs in the fifth.
Jake Lamb's two-run single with two outs in the top of the fifth put Arizona ahead 2-0 and ended Gallardo's consecutive scoreless streak at 33 1/3 innings. A.J. Pollock's RBI single with two outs in the sixth made it 3-0 and chased Gallardo (7-7).
Paul Goldschmidt had two hits, including an RBI single in the eighth.
The Rangers got on the scoreboard in the bottom of eighth as Arizona right fielder Yasmany Tomas missed Andrus' line drive for a three-base error and Andrus scored on Shin-Soo Choo's sacrifice fly. Delino DeShields doubled with two outs and scored on Rougned Odor's single, chasing Ray.
Brad Ziegler pitched a perfect ninth inning for his career high-tying 13th save in 15 opportunities.
The Diamondbacks won for the fourth time in five games and handed Texas its fourth straight loss.
Rangers pitchers have allowed 37 runs and 60 hits during the losing streak.
Gallardo allowed eight hits and five walks. The Diamondbacks put their first two batters on base in both the second and fourth innings. Texas turned double plays on balls in the air to stop both threats.
Gallardo's scoreless streak was the third-longest in franchise history, trailing Kenny Rogers' 39-inning stretch in 1993 and Charlie Hough's 36 innings in 1983.
Rangers: LF Josh Hamilton returned to the lineup after missing two games because of a strained hip muscle. ... LHP Derek Holland (strained shoulder), on when he would start throwing against batters: "You guys will all know before I do."
Diamondbacks: RHP Jeremy Hellickson (6-5, 5.06 ERA) is 0-3 with a 3.86 ERA in five starts against Texas.
Rangers: LHP Matt Harrison is scheduled to make his first major league appearance since May 13, 2014. He underwent spinal fusion in June 2014. In six injury-rehab starts this season, Harrison went 1/3 with a 6.23 ERA. He was won only one major league game since going 18-11 in 2012. Harrison is 0-1 in two starts vs. Arizona.