From: Henon Date: 2003-08-11T07:15:21+09:00 Subject: 1.8.0, YAML funny feature hi i happened to edit a yaml file manually. after doing so it didn t load anymore - parse error! i think this should not happen. the parser /must/ become a bit more robust. the problem: the parser handles "\n" and "\r\n" differently. a windos- specific problem? See following irb session: irb(main):006:0> YAML::load "-1\n-\n - 1\n - 2\n - 3\n-2"=> [1, [1, 2, 3], 2] irb(main):007:0> YAML::load "-1\r\n-\r\n - 1\r\n - 2\r\n - 3\r\n-2" ArgumentError: parse error on line 5, col 3: `-2'from F:/SCRIPT/ruby/lib/ruby/1.8/yaml.rb:28:in `load' from F:/SCRIPT/ruby/lib/ruby/1.8/yaml.rb:28:in `load' from (irb):7 irb(main):010:0> YAML::load "-1\r\n-\r\n - 1\r\n - 2\r\n - 3\r\n-2"=> ["1\r", "\r-1\r - 2\r - 3\r", 2] the last line loads (due to a space added at index 8) but is completely inacceptable. annother question: why does to_yaml print a space after a single - (dash)? ok - not against yaml syntax rules. i have no real evidence yet, but i believe that the parser relies on this in some special cases (as seen in the irb output). win2k, ruby 1.8.0 -- - Henon 'mmeeiinnnrrrrraaaaddd.rrreeeeecccchhhhhheeeeiiiiiissss@gggggggmmmmxxxxxx.aaaaattt'.squeeze!