On Wed, Jul 2, 2008 at 8:57 PM, Igal Koshevoy <igal / pragmaticraft.com> wrote:
> Luis Lavena wrote:
>>
>> We can also wish works?
>>
>> http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/16b633959fe5ea88
>
> Check out http://pastie.org/226516
>
> I reduced your sample code, reworked it a bit, but am also getting weird
> results. It seems that when the alias is used, the original item is removed.
> Also note how the leading whitespace is creating very different output.
>
> Ideas?
>

I've compared the results to RbYAML

Without using the leading spaces, you get a Parser exception:

 while scanning a node (RbYAML::ParserError) expected the node
content, but found

The output for second example, however:

---
reuse_sequence:
- two: 2
  one: 1
- three: 3
sequence:
- one: 1
- two: 2

Displays properly.

RbYAML is the vesion of YAML in pure Ruby, which is the one bundled
with JRuby if I remember correctly.

-- 
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams