Saturday, May 24, 2008

change about RbYAML#load

These days, I was working on adding more spec test cases, most of them are from jvyamlb.

What have been changed?
1. RbYAML could load an empty instance, that means it doesn't has any value. Previously, rbyaml will throw exceptions during load an instance without value.
For example,
RbYAML.load("!!str") => ""
RbYAML.load("!!null") => nil
#nil is an instance of NilClass

2. RbYAML will return nil when load an empty stream
RbYAML.load("") => nil


Another thing is that I am going to support both YAML1.0 and YAML1.1 for there's differences between them.
You could use "require 'rbyaml_1.0'" to get a YAML1.0 parser.
But you should notice that YAML1.0 parsing is still on the way.

No comments: