Ray took the mound in the bottom of the third and made one warm-up pitch before he was visited by manager Torey Lovullo. After a brief meeting, Ray walked toward the dugout with the team trainer.
Ray said he could have pushed through, but he didn't "want it to turn into something that is a bigger issue."
Ray struck out two, walked two and allowed one run over two innings. He was replaced by right-hander Matt Andriese.
Ray is 10-7 with a 3.99 ERA this season.
Information from The Associated Press was used in this report.