Ron M
2/20/2006 8:55:00 PM
IIRC, in a previous version, I was able to make more
human-friendly YAML using the :SortKeys option as shown below.
Since upgrading to 1.8.4 the keys seem not to be sorted anymore.
Has the way of doing this changed? I hope this feature hasn't
gone away. The main reason we're using YAML instead of XML is
that it was more human-readable, and the SortKeys option added
a major part of the human-readability.
irb(main):016:0> puts( {1,'a',2,'b',3,'c',4,'d',5,'d'}.to_yaml(:Indent=>1,:SortKeys=>true))
---
5: d
1: a
2: b
3: c
4: d
=> nil