-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2005.12.17 15:37, "Daniel Berger" <djberg96 / gmail.com> wrote:
> Just out of curiosity, why are double quotes added to the start and end
> of the string when doing String#dump?  I can see where it's happening
> in string.c, but I don't understand the purpose.

I venture as my guess that it is merely intended to allow
storing an 'internal' representation of the String. It looks
like all special characters are escaped. This might be useful
for, say, #eval or debugging maybe?

  'foo'.dump  # => "\"foo\""
  "\nf".dump  # => "\"\\nf\""

> Thanks,
> 
> Dan


E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDo70LxvA1l6h+MUMRAlgSAJ9Q7G+i7OrUtmm1P1eE67mbBzHmSQCgibwd
fJ7fffK1TP1SXfIBuaPyvc4=
=dM1n
-----END PGP SIGNATURE-----