Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inconsistent quoting behavior when serializing strings starting with zero #701

Open
@jefmathiot

Description

Hello there,

we detected a weird behavior when serializing UUIDs. Some of them, such as 0054971b-b746-4776-ae7a-d942cd511393, are quoted during dump, whereas others, such as 0645cada-c729-48cb-a4e3-9d8cbc7cb510 aren't.

The observed behavior seems related to this commit created to fix this issue with floats handling.

The YAML 1.2 schema uses this regexp /[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?/ to match floats, but on Psych side this regexp is used: /\A0[0-7]*[89]/, which leads in my understanding to an inconsistent behavior.

I'd be glad to craft a PR but I' not sure whether Psych behavior is expected or not.

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /