--y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 20, 2010 at 03:27:16AM +0900, 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 would have expected this to work... This is a bug in Syck (the yaml parser / emitter in Ruby < 1.9.2). The bug is fixed in Psych. Psych ships with Ruby 1.9.2: irb(main):001:0> RUBY_VERSION => "1.9.2" irb(main):002:0> require 'psych' => true irb(main):003:0> require 'set' => true irb(main):004:0> Psych.load(Psych.dump({[1].to_set=>1})) => {#<Set: {1}>=>1} irb(main):005:0> Psych.load(Psych.dump([1,2,3].to_set) irb(main):006:1> ) => #<Set: {1, 2, 3}> irb(main):007:0> -- Aaron Patterson http://tenderlovemaking.com/ --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) iQEcBAEBAgAGBQJMvgqJAAoJEJUxcLy0/6/GkJoH/jYQHit3rwn3IO6m4EreqSft z9SGLRWBMxE5Esw/gtJrZkTFz86/v/qsKxY60/UsmFghaolnRPdKoG9ZJQX8Xelc BOOKaIxlllqOpV/3tohJTpP28qincBKNLy6gSUFp8uJTY7UXt3K0xR+p13Ly07dY tNlRXEhdfdm3CA8/HfKQTQ26op2cN2+yzrrCpQCT92fhUA+XyJ5josnrNNRuByuu pELy9r6P+h8iAwcHvL0mvTzJnFke45j4UxyA2fK9Xx4JrAh4NEwZj5YKjoxoACAF QKHD31aRQ2Zlk4GkHFnMn7s0/JMowhYE0i17oyBpjYguj3fETAn/Ro7HHJaJjKM Av -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6--