Ray (7-13) walked three batters in the first and uncorked a wild pitch that helped move Corey Seager to third, where he could score on a Yasiel Puig sacrifice fly.
"The first inning, I was just having trouble getting a feel for my pitches," Ray said. "After that, I just found it. I found all of them, and they just started working for me."
Ray did not allow another hit until Puig hit a solo homer in the sixth.
"That first inning, three walks, hurt him, but other than that he pitched great, pitched very well," D-backs manager Chip Hale said. "Used his changeup tonight, used his breaking ball. He had very good stuff, lot of strikeouts again. Just we were not able to support him, to score some runs."
Ray struck out 12, the fourth time this year he has fanned 10 or more batters in a start, and he allowed just two hits.
Good numbers, for sure, but for Ray to take the next step in his development, he needs to avoid those innings where he walks hitters, or has his pitch count rise.
"It's just the walks," Ray said. "I need to cut back on the walks. It could be the difference in the game. I think I could have easily pitched into the eighth inning if I hadn't walked those guys and had a first inning like that. I think that's probably the only thing is just being able to come into the game and have that feel instead of having to find it."
A positive for Ray on Wednesday was the way he was able to change speeds on his breaking pitches.
"That's something I've been working on, because I've always had a curveball and a slider, but they've been like pretty much the same velocity," he said. "You couldn't really tell the difference between them, so I've just been mixing it up and trying to throw something slower to keep guys off balance."