From: "Florian Groß" Date: 2004-12-09T22:57:04+09:00 Subject: Re: [ ruby-Bugs-1173 ] Incorrect escaping in strings produced by String::inspect David A. Black wrote: >> I think the original poster wanted '#@a'.inspect to be "\#@a" instead >> of "#@a". (There's no interpolation for single quote Strings and this >> form of variable interpolation can be escaped via \) > > I don't think that's what he meant. eval('#@a'.inspect) doesn't raise > a SyntaxError, whereas what he's written does and that was what he was > suggesting was buggy. It does not raise a SyntaxError, but it does not produce '#@a' -- it produces ''. It's the same issue that raises a syntax error for eval('#@'.inspect).