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:
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: