-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML parses okay on CRuby, raises exception on JRuby #4847
Comments
Huh, this is pretty simple YAML too. I've confirmed it's valid YAML (the parser we use can be finicky) so it definitely should be ok. The only escape character is |
Well I've confirmed it's not fixed in the latest SnakeYAML (the library we use). I'll bring it to them. |
So it turns out I've dealt with this before, but never followed up to get it fixed in SnakeYAML 😞 https://bitbucket.org/asomov/snakeyaml/issues/350/failure-to-parse-escaped-single-quote-in-a This was originally reported in #2199 where @asomov pointed out that the single quote is not a valid character in the YAML spec, and I confirmed that neither YAML 1.1 nor 1.2 list it as valid. http://www.yaml.org/spec/1.2/spec.html#id2776092 I do not know why MRI passes this. I had not noticed the online YAML tester I used (http://www.yamllint.com/) is "optimized for ruby" so that explains in why it said it was ok. Another tester, based on Python, rejects it (http://yaml-online-parser.appspot.com/). So, I think maybe we need to pull in @hsbt and @tenderlove. This does not appear to be valid YAML according to any spec, and yet MRI accepts it. Why? |
I will close the older bug in favor of this new active bug. |
I've filed an additional bug with libyaml. Hopefully I won't have to also file a bug with Psych to get some movement on this! (cc @hsbt, @tenderlove) |
If we fix this at all, it won't be in 9.1.15.0. |
A PR has been created for libyaml (which seems very likely to be merged), which means this is going to start percolating back into MRI. Given that fact I'm going to close this as Won't Fix and let MRI know what's happening. |
cheers, great @headius |
testcase.yml
JRuby
CRuby
The text was updated successfully, but these errors were encountered: