# Weird results with YAML using anchors and sequences

**URL:** <https://www.ruby-forum.com/t/weird-results-with-yaml-using-anchors-and-sequences/142011>\
**Category:** Ruby\
**Created:** [July 2, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/weird-results-with-yaml-using-anchors-and-sequences/142011 "2008-07-02T16:30:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [July 2, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/weird-results-with-yaml-using-anchors-and-sequences/142011/1 "2008-07-02T16:30:53Z")

</div>

Hello everybody!

I’ve been using YAML more extensively lately, and hit a wall today. I  
tried to narrow the problem to the minium here:

[http://pastie.org/private/xmrb0lztt4g46ankvow](http://pastie.org/private/xmrb0lztt4g46ankvow)

On the pastie, you can see the usage of anchors and sequences, as  
described in the YAML specs 1.1, Structures, anchors and aliases.

[http://yaml.org/spec/1.1/#id857577](http://yaml.org/spec/1.1/#id857577)

But for some reason, MRI yaml eat always the last item in the  
sequence, but only in the one with the anchor.

Moreover. RbYAML which is the one used in JRuby parses the .yml file  
correctly.

Anyone encountered this kind of problems with MRI builtin YAML, or I’m  
doing something wrong? (which usually happens).

Thanks in advance for your time.

Regards,
