psych icon indicating copy to clipboard operation
psych copied to clipboard

Ensure strings that may be confused as YAML1.2 numbers are quoted

Open adammw opened this issue 2 years ago • 3 comments

Ensure strings that may be confused as YAML1.2 numbers are quoted.

Example: 0o123 or 1e3 strings in Ruby will be printed without quotation marks, resulting in them changing to numbers in a YAML1.2-parser (like that used in Go).

Fixes #627

adammw avatar May 10 '23 06:05 adammw

@adammw Any chance you have time to continue working on this? I've run into this same problem where strings (git commit SHAs) that look like scientific notation are dumped with no quotes around them.

djhoese avatar Oct 09 '24 15:10 djhoese

@djhoese Ironically that's the exact reason I started looking into this 😅 but also why it's been pretty low priority, the "solution" is just to rewrite the commit to get a different SHA so it doesn't hit this condition

adammw avatar Dec 05 '24 05:12 adammw

This seems to solve #701 as well

❤️

CarlosCD avatar May 15 '25 18:05 CarlosCD