Skip Menu |

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 19118
Status: rejected
Priority: 0/
Queue: YAML-Syck

People
Owner: Nobody in particular
Requestors: autrijus [...] gmail.com
ben [...] incomumdesign.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Syck mangles arrays when they're assigned a merge key
Sorry this is a ruby example, but I tried to post it to ruby-core and couldn't manage to subscribe, so I thought this would be the next best option since Syck is really a C extension anyway, right? ;) Run this sample code through ruby: require 'yaml' text = <<EOD key: &key - some_value: 0 - another_value: 100 yet_another_value: 1000 another_key: <<: *key EOD puts YAML::load(text).inspect Here's the output on my machine: {"another_key"=>{"another_value"=>100, "some_value"=>0, "yet_another_value"=>1000}, "key"=>[{"some_value"=>0}, {}]} It seems as though the second element is being nuked in the source array, and the two hashes are getting glued together when accessing the source through the merge key.
Subject: Re: Syck mangles arrays when they're assigned a merge key
Date: Sun, 7 May 2006 21:53:26 -0700
To: bug-YAML-Syck [...] rt.cpan.org
From: "Audrey Tang" <autrijus [...] gmail.com>
Well, I think writing to Why directly is more useful, as it appears that YAML::Syck's version of syck doesn't support merge keys anyway... :) Audrey On 5/6/06, Guest via RT <bug-YAML-Syck@rt.cpan.org> wrote: Show quoted text
> > Sat May 06 15:31:50 2006: Request 19118 was acted upon. > Transaction: Ticket created by guest > Queue: YAML-Syck > Subject: Syck mangles arrays when they're assigned a merge key > Owner: Nobody > Requestors: ben@incomumdesign.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=19118 > > > > Sorry this is a ruby example, but I tried to post it to ruby-core and > couldn't manage to subscribe, so I thought this would be the next best > option since Syck is really a C extension anyway, right? ;) > > Run this sample code through ruby: > > require 'yaml' > > text = <<EOD > > key: &key > - > some_value: 0 > - > another_value: 100 > yet_another_value: 1000 > > another_key: > <<: *key > > EOD > > puts YAML::load(text).inspect > > Here's the output on my machine: > > {"another_key"=>{"another_value"=>100, "some_value"=>0, > "yet_another_value"=>1000}, "key"=>[{"some_value"=>0}, {}]} > > It seems as though the second element is being nuked in the source > array, and the two hashes are getting glued together when accessing the > source through the merge key. >