nil emited as an empty string
Status: Alpha
Brought to you by:
whythluckystiff
nil is emited as an empty string. This produces
incorrect YAML output.
So YAML::load({nil=>nil}.to_yaml) fails.
Proposed change in yaml/rubytypes.rb:
class NilClass
def is_complex_yaml?
false
end
def to_yaml( opts = {} )
opts[:KeepValue] = true
"~".to_yaml( opts ) # "~" instead of ""
end
end