The Yankees’ right-hander spoke quietly after being ejected in the second inning of the Red Sox’ 5-1 win over New York on Wednesday night. And less than two weeks after appearing to get away with using a foreign substance in another game against Boston, he vowed never to do it again.

Pineda said he had trouble gripping the ball on the cool evening when he allowed two runs in the first inning. So before he took the mound for the second, he said, he rubbed pine tar on the right side of his neck.

“I don’t feel the ball,” he said. “I don’t want to hit anybody.”

One small problem: Rule 8.02(b). Written to keep pitchers from altering the ball to gain an unfair advantage, it prohibits them from having a foreign substance on them or in their possession on the mound and says that they’ll be suspended if they do.

That suspension could be announced Thursday. In recent suspensions of pitchers for pine tar, Tampa Bay’s Joel Peralta was penalized eight games in 2012, the Los Angeles Angels’ Brendan Donnelly 10 days in 2005 and St. Louis’ Julian Tavarez 10 days in 2004. The suspensions of Donnelly and Tavarez were cut to eight days after they asked the players’ association to appeal.

“We will talk to the umpires (Thursday) and review their report before taking any action,” Major League Baseball spokesman Michael Teevan said.

Boston manager John Farrell, especially vigilant after Pineda was spotted with a brown gooey substance on his right hand in the fourth inning on April 10, asked plate umpire Gerry Davis to check the pitcher with two out and no runners in the second.

Yankees general manager Brian Cashman and manager Joe Girardi said they didn’t know Pineda had the pine tar on his neck when he went on the field for the second. By the time they found out, it was too late.

“Go to the mound and wipe it off?” Girardi said. “Well, that would have been a little obvious.”

But how could Pineda take a chance by putting pine tar in a more visible spot than where the substance — he said it was dirt — was seen in the Yankees’ 4-1 win over the Red Sox on a cold night in New York?

“I don’t know,” he said.

Farrell didn’t protest then because he didn’t see a photograph of Pineda’s hand until the fourth inning and, when Pineda came out to warm up for the fifth, his hand was clean.

“It is surprising, especially being on TV the first time we played them,” said Boston’s Mike Napoli, who had three hits. “Every pitcher does something. You can’t blatantly be out there showing. It’s kind of silly.”

Did the Yankees tell Pineda directly after the first instance not to do it again?

He said he was “embarrassed.” Girardi said Pineda used “poor judgment” but didn’t try to cheat. Pineda said he was “sad” and apologized to teammates.

The pine tar appeared on his neck after a rough first inning in which he allowed four hits, including RBI singles by Dustin Pedroia and A.J. Pierzynski. He was much better in the second, striking out two batters. But when he got a 1-2 count on Grady Sizemore, Farrell came out of the dugout and asked Davis to check Pineda.

“When it’s that obvious, something has got to be said,” Farrell said. “Our awareness was heightened, given what we had seen in the past.”

Davis said he found pine tar and Pineda gave no explanation as he left the mound without protest.

Cashman said that in a similar situation, “I would want my manager to do what John Farrell did.”