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
{{ message }}
Repository navigation
Add enough primitives to support comment preservation #566
Was wondering if having enough internal primitives in psych to implement this is a good idea? Should comment preservation be built into Psych (optionally) or is this the role of some other gem that consumes it?
Reacted by Michael Fitz-Payne, hideboy, Sebastian Cohnen, Bartosz Polaczyk, Sam Jenkins, h0jeZvgoxFepBQ2C, Hordur Freyr Yngvason, Adam Lassek, Samuel Giddins, Benoit Tigeot and 3 more
FWIW the psych backend for JRuby is SnakeYAML Engine, which does allow preserving comments in the parser graph. We could probably enable this for JRuby pretty easily.
Activity
DTrejo commentedon Oct 9, 2025
👀
qinmingyuan commentedon Jan 9, 2026
https://github.com/kddnewton/psych-pure Is the Best!
headius commentedon Jan 9, 2026
FWIW the psych backend for JRuby is SnakeYAML Engine, which does allow preserving comments in the parser graph. We could probably enable this for JRuby pretty easily.
SamSaffron commentedon Jan 10, 2026
@headius psych-pure should work fine in JRuby it is a native Ruby implementation.
headius commentedon Jan 10, 2026
@SamSaffron Oh I'm sure it will! But we can will enable native support for comments in the JRuby extension for better performance.
Fwiw calling it "Native Ruby" is a little confusing since we have both "native" code and Ruby code in these libraries.