You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
key:
"/Psych is a YAML parser and emitter. Psych leverages libyaml for its YAML parsing and emitting capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format./"empty_key:
Then load and dump it:
Within MRI ruby, the output is:
---
key: "/Psych is a YAML parser and emitter. Psych leverages libyaml for its YAML parsing and emitting capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format./"empty_key: #An empty space was added here.
But in jruby, the result is a little different:
---
key: "/Psych is a YAML parser and emitter. Psych leverages libyaml for its YAML parsing\\ and emitting capabilities. In addition to wrapping libyaml, Psych also knows how\\ to serialize and de-serialize most Ruby objects to and from the YAML format./"empty_key:
There are two differences:
Jruby added backslashes for new line
MRI ruby added a space after empty_key:
The text was updated successfully, but these errors were encountered:
Could this be something that changed in YAML 1.2? The Psych extension for JRuby moved to a newer version of SnakeYAML (SnakeYAML Engine) that is now YAML 1.2 compliant.
Given the following input
Then load and dump it:
Within MRI ruby, the output is:
But in jruby, the result is a little different:
There are two differences:
The text was updated successfully, but these errors were encountered: