summaryrefslogtreecommitdiff
path: root/test/psych/test_data.rb
AgeCommit message (Collapse)Author
2026-04-03merge revision(s) c27ae8d91aadca0660070ee1eeae9598b1fe47ee, ↵Takashi Kokubun
b6e6ccc6c22ebb464ce101e42a14e7daea2a80b6, cbca59377ebfa1bc1183322fa9d9d0067d445c24: [Backport #21844] [ruby/psych] Remove excessive check of message Make `Data#initialize` reject `Integer` keys [Bug #21844] Fix error message
2025-12-15[ruby/psych] Check that Data members match exactlyBenoit Daloze
* Fixes https://github.com/ruby/psych/issues/760 https://github.com/ruby/psych/commit/952008c898
2025-05-01Add support for Data objects with ivarsnick evans
This sets the ivars _before_ calling initialize, which feels wrong. But Data doesn't give us any mechanism for setting the members other than 1) initialize, or 2) drop down into the C API. Since initialize freezes the object, we need to set the ivars before that. I think this is a reasonable compromise—if users need better handling, they can implement their own `encode_with` and `init_with`. But it will lead to unhappy surprises for some users. Alternatively, we could use the C API, similarly to Marshal. Psych _is_ already using the C API for path2class and build_exception. This would be the least surprising behavior for users, I think.