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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
unknown (Guest)
on 2006-06-07 20:09
(Received via mailing list)
I don't think this is specific of yaml - it's done to say that your
variable
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,

Axel
Dave B. (Guest)
on 2006-06-07 20:34
(Received via mailing list)
On 7 Jun 2006, at 17:08, removed_email_address@domain.invalid wrote:

> Axel
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.

Dave.
This topic is locked and can not be replied to.