It sounds moronic, but like with so many scams, it works because the crook is talkative and pushy. They can shove the ring into your hand and start badgering you for money before you've fully processed what's happening, and then you're the foreigner worried about being rude or making a scene in a strange city. But they usually give up when challenged, because scams like these are all about the raw number of targets. So you just have to stay calm and collect yourself.
Travel forums tend to be full of the latest sightings and strategies, and Parisian police have started to crack down by putting officers around major tourist hubs. Just be wary if a stranger is suddenly claiming to be an expert jeweler, especially if there's someone with them who might be stealing your wallet while you're distracted.
The scam is so ubiquitous in Paris that frequent visitors treat it like a rite of passage. In 2018, a variation was spotted in Northern California and western Canada wherein someone supposedly desperate for gas money will try to sell you their "gold" jewelry. Whatever you may encounter, you can pretend to not speak the language, or just keep saying no until they move on to another target. If they're unusually determined, maybe try spinning a story about how the last time you wore a gold ring, it led to a terrible war.