Joseph J. Lhota, the Republican candidate for mayor, was strolling the aisles of the Gourmet Glatt Market in Borough Park, Brooklyn, on Wednesday, stopping to admire a long row of kosher sorbets, and wondering aloud what made a vegetable kosher or not kosher. (The answer: bugs.)

At one point, the store’s general manager, Sam Segedin, picked up a bag of kosher Skittles, which until two weeks ago were available only in Israel.

“People had to suffer for a long time,” deadpanned Michael Fragin, a political consultant and Mr. Lhota’s liaison to the Jewish community, adding that his wife loves the sweets.

Mr. Lhota apparently does not.

“I was at a party recently where some people had a bowl out, and I thought they were M&M’s, and then it was Skittles,” he said. “Let me tell you: when you think it’s M&M’s, and it ends up being Skittles, it’s a little shocking.”