From: Brian Candler Date: 2008-11-03T23:01:26+09:00 Subject: Re: Problem with YAML not returning exactly the same Yes, I can reproduce this here with both 1.8.4 and 1.9.1-preview1. YAML is fine for reading config files, but as you've just discovered, it sucks for object serialisation. Welcome to YAML. Your test case appears to boil down to the following: require 'yaml' data1 = [{"foo"=>"\n", "bar"=>"baz\n \nbaz"}] p data1 data2 = YAML.load data1.to_yaml p data2 This gives the following results: [{"foo"=>"\n", "bar"=>"baz\n \nbaz"}] [{"foo"=>"", "bar"=>"baz\n\nbaz"}] Feel free to submit it as a bug report. http://www.ruby-lang.org/en/community/ruby-core/#patching-ruby -- Posted via http://www.ruby-forum.com/.