From: yermej Date: 2010-10-20T13:10:13+09:00 Subject: Re: YAML serialization of Hash with Set key not loadable On Oct 19, 1:27 pm, Tim Garnett wrote: > YAML serialization seems to be failing for me with any structure that > involves a hash with a set key. Is there documentation anywhere on what > sorts of objects are able to be serialized/deserialized via YAML? Or if > this is a bug that's fixed in a newer ruby version (I'm using > 1.9.1p378)? I'm seeing the same behavior in 1.8.6p399 and 1.9.2rc2 so it's probably a bug that's been around for a while. I don't know the reason for the issue since it seems to be somewhere in the Syck library. In any Ruby I've tested: ruby-1.9.2-rc2 > puts YAML.dump({[1].to_set=>1}) --- !ruby/object:Set ? hash: 1: true : 1 => nil while the correct YAML is: --- ? !ruby/object:Set hash: 1: true : 1 I guess that means it's a Syck bug, but this is all from a quick look so I'm not sure. Jeremy