Conversation
Psych 4.0 defaults `load` behavior to `safe_load` so these unsafe loads need to be guarded on version. Safe versions should probably be added.
|
First commit fixes the unsafe class loading happening in a few |
|
Quick note: there were already changes to deal with this in https://github.com/ruby/ruby/tree/master/spec/ruby, which are not sync'd here yet. |
|
Your split seems better though, thanks! |
|
Would it not be best for gem-based specs to guard on the version of the library going forward? That will allow implementations more freedom to ship newer gems in update releases. It is also not possible to run Psych 4.0 specs on any Ruby less than 3.1 if we guard on Ruby version >=3.1. This will make Psych dev more cumbersome. Perhaps the Psych specs should move under ruby/psych? I assume the other failures have been addressed in ruby/ruby so I won't go into them here. |
|
Yes, guarding on the Pysch version as you did here is definitely better. Moving those specs to Psych could make sense, but it would need some effort to get mspec available there, integrate in CI, and still make it easy for other Ruby implementations to run those specs in their CI. |
* Based on #837 * Run both with YAML.load on Psych < 4, only safe on Psych >= 4 * Run both with YAML.unsafe_load (available in Psych >= 4) Co-authored-by: Charles Oliver Nutter <headius@headius.com>
|
Integrated in c6e9285 (given the conflicts rebasing or merging was too hard) |
Psych 4 no longer passes the YAML specs. This PR will fix or reorganize the specs to support 4.0.0 behavior.