Quick follow-up to the last message. YAML4R 1/3 is out. Changes from 0.30
are listed below in YAML format.
I’ve also had some users say they think YAML4R is an idiotic name and I can
see their point. I’ve thought about changing the name to Rype. “Ruby’s
Yaml Parser and Emitter.” Any other ideas would be nice. I don’t want to
cause confusion with other projects like Rite that have similiar phonetics.
— #YAML:1.0 #TAB:NONE
- Better String#to_yaml, uses the parser’s implicit type checker now!
- Headless documents now skipping the initial newline properly.
- Turned off SortKeys by default; still turned on in the tests.
- Opened up unquoted strings to more characters, is closer to spec now.
- Round tripping started with YTS.
- Problems with foreign characters fixed. Thanks, Robert Wagner.
- Problems with Array#to_yaml and Hash#to_yaml not giving a newline when nested. Again, RW.
- Bugs in positive timezones with Time#to_yaml fixed by Tobias Peters!
- Fixed bug in multiline quoted strings.
- Added YTS cases for odd newline and spaced block scalars.
For those who are curious about YAML, the above can be loaded into
YAML4R, if saved in a CHANGELOG file, like so:
clog = YAML4R::load( File.open( ‘CHANGELOG’ ) )
The ‘clog’ variable will now contain an Array of Hashes. If you
look over the CHANGELOG, you’ll see that it’s basically a list
with the dash ‘-’ representing the entries in the list. The
contents of the entries are indented. Each entry is a mapping,
represented by : pairs (such as ‘version: 0.31’).
Now try saving the CHANGELOG back out from Ruby!
File.open( ‘CHANGELOG.2’ ).write( clog.to_yaml )
That’s YAML: simple, readable plain-text data structures!