# Re: Possible YAML bug with quoted symbols?

**URL:** <https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/62732>\
**Category:** Ruby\
**Created:** [June 7, 2006, 6:09pm UTC](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/62732 "2006-06-07T18:09:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [June 7, 2006, 6:09pm UTC](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/62732/1 "2006-06-07T18:09:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [June 7, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/62732/2 "2006-06-07T18:34:49Z")

</div>

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.
