Skip to content

Double quotes (2) #324

@knugie

Description

@knugie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions