Bug #991
YAML: '--- stuff' not escaped as root-level hashkey
| Status: | Open | Start date: | 01/09/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | Ruby 1.8.6 | |||
| ruby -v: | Ruby 1.8.6 |
Description
>>{"--- foo" => "bar"}.to_yaml
=> "--- \n--- foo: bar\n"
>> YAML.load _
=> nil
(the --- needs to be put in quotes so it's not interpreted as the start of a new yaml, i.e.
"--- \n\"--- foo\": bar\n")
I also required the yaml.rb in 1.9.1 preview1; it seems to be a problem there too.
History
Updated by ko1 (Koichi Sasada) over 3 years ago
- ruby -v set to Ruby 1.8.6