Bug #719: yaml not precise on some strings
http://redmine.ruby-lang.org/issues/show/719

Author: a b
Status: Open, Priority: Normal

require 'yaml'
data1 = [{"foo"=>"\n", "bar"=>"baz\n \nbaz"}]
data2 = YAML.load data1.to_yaml
p data1, data2

=>
[{"foo"=>"\n", "bar"=>"baz\n \nbaz"}]
[{"foo"=>"", "bar"=>"baz\n\nbaz"}]

I am not sure if yaml is supposed to return exactly the same value. I used the value for a hash, so I realized it is not exactly the same.

I tested it in 1.8.7 - Brian Candler <b.candler / pobox.com> from ruby-mailinglist reported it also on 1.8.4 and 1.9.1-preview1.

thanks.


----------------------------------------
http://redmine.ruby-lang.org