Bug in Ruby YAML

Recently I stumble on a really wierd bug in Ruby's YAML implementation(using syck parser that is default for ruby < 1.9.3).

The problem is that the parser converts \r\n(windows new line) into \n(linux new line),you can see this error by running this code:

YAML::load(YAML::dump("test\r\n"))

running this will return "test\n" while it should return "test\r\n" (serialzing and deseralizing are suppose to be exact inverse function).

This is fixed in Ruby 1.9.3,since it uses the psych parser by default.