Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for instance variables in Marshal.dump #2393

Merged
merged 8 commits into from
Dec 16, 2024

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Dec 15, 2024

The only issues related to instance variables are related to non-ascii names, that is an issue outside of Marshal.
This includes some rudimentary support for Exception and Struct dumping, the basic versions work but they still have to be refined.

This code is way too repetitive, and should be refactored before we can
extend it to other classes.
Convert the encoding string to binary encoding, so we can use the
generic write method to store it.
This makes the code a bit more generic
Don't clutter the generic Object dump
And uncover an issue with restoring this. You win some, you loose some.
Since the load specs depend on dump, it's probably better to keep the
dump and disable the load for now. The old code was passing, but this
was a coincidence.
@herwinw herwinw merged commit 17e3352 into natalie-lang:master Dec 16, 2024
17 checks passed
@herwinw herwinw deleted the marshal_dump_ivars branch December 16, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants