From: Dan Kirkwood Date: 2007-01-09T06:37:20+09:00 Subject: incorrect yaml? Here's a simple yaml output from the Ruby to_yaml method: sample = { 'foo' => %w[ a b c ] } puts sample.to_yaml => --- foo: -a -b -c This does *not* load in to the yaml module in Perl (changed to a one-liner for brevity): ruby -ryaml -e 'puts ({%{foo} => %w[a b c]}).to_yaml' | perl -MYAML -0777 -e 'YAML::Load(<>)' YAML Error: Invalid element in map Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT Line: 3 Converting a similar structure using Perl produces yaml with the list indented. My question is: which implementation is correct? Should the a,b,c list be indented? The Ruby output is read properly by Ruby, but not Perl. The Perl output is read properly by both. I've dug thru the yaml.org spec, but can't find any reference that tells me which is correct.. Using Redhat Enterprise Linux 4, ruby 1.8.5, perl 5.8.8 w/YAML.pm 0.62 -- Posted via http://www.ruby-forum.com/.