Triple single quote vs triple double quote in Ruby shows up wrong on the question page, and I initially tried editing the quotes to fix them, before seeing that my changes hadn't changed the displayed title!
That's semantically wrong, since curly quotes in Ruby are not the same as straight*, so SO is silently damaging the question, and there is no workaround possible. bobince appears to have the right idea here of annihilating smart quotes in titles entirely (found through Two hyphens get changed to a long dash in titles (-- vs -), which has a workaround and is thus not a dupe.)
*AFAIK