Project

General

Profile

Actions

Backport #991

closed

YAML: '--- stuff' not escaped as root-level hashkey

Added by gyngve (Gary Yngve) over 15 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
[ruby-core:21225]

Description

=begin

{"--- 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.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0