Forum: Ruby Re: Possible YAML bug with quoted symbols?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
67bb4df2775f6a6b603347dce7119571?d=identicon&s=25 unknown (Guest)
on 2006-06-07 18:09
(Received via mailing list)
I don't think this is specific of yaml - it's done to say that your
name is a String that contains a ' or a " at the beginning and end ,  so
\"my_string\" or \'my_string\'
are Strings with quotes in them and not the same
as the Strings a="my_string" or a='my_string' .

Best regards,

D8914caf9cc67403f1f153e0a2104293?d=identicon&s=25 Dave Baldwin (Guest)
on 2006-06-07 18:34
(Received via mailing list)
On 7 Jun 2006, at 17:08, wrote:

> Axel

Thanks for replying, but I don't follow what you are saying here.  I
am using YAML to store objects in a database to later be retrieved
and this marshaling or serialisation  process must be bidirectional
so whatever goes in comes out *exactly* the same, i.e.

      some_object == YAML.load(YAML.dump(some_object)		# == is being
used to mean the same as

and this doesn't appear to be the case when some_object is a quoted
symbol :'some symbol'.  If I were only dealing with symbols I could
work around this, but the symbol is buried inside some object
hierarchies.  In this case I don't really care how YAML encodes the
objects as long as it can be treated as text.

This topic is locked and can not be replied to.