From: why the lucky stiff Date: 2003-08-15T06:39:25+09:00 Subject: Re: 1.8.0, YAML funny feature The strings you're using below are not valid YAML, so my parser throws errors. These sequences: -1 - - 1 - 2 - 3 -2 ..need spaces after the dashes. So here's my IRb session: >> YAML::load "- 1\n-\n - 1\n - 2\n - 3\n- 2" => [1, [1, 2, 3], 2] >> YAML::load "- 1\r\n-\r\n - 1\r\n - 2\r\n - 3\r\n- 2" => [1, [1, 2, 3], 2] So I'm getting back the right arrays with either line ending. This is with Andy's latest Ruby 1.8.0 Windows Installer. _why On Sunday 10 August 2003 04:15 pm, Henon wrote: > 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]