ruby/psych

Double quotes (2)

Closed this issue · 0 comments

When emitting YAML using Psych, strings that have a key-value pair where the value contains a colon and a single quote, Psych escapes the single quote with another single quote, relates to #157.

I'd expect
Psych.dump(key: "me: I don't think so")
to return
"---\n:key: \"me: I don't think so\"\n"
It actually returns
"---\n:key: 'me: I don''t think so'\n"

This is not a huge issue but confuses people.