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.