psych icon indicating copy to clipboard operation
psych copied to clipboard

Subclasses of Hash marshal full Rubinius-specific instance vars

Open headius opened this issue 10 years ago • 0 comments

For #216 and #217, @jemc modified Hash and String serialization to only include instance vars for subclasses. However, this still causes problems with Rubinius, since the subclass would still appear to have all the internal do-not-touch-me instance variables from their Ruby-based Hash impl.

In #216, one suggestion was to capture {}.instance_variables at boot and subtract those from instance variables serialized to YAML. This might be good enough.

Note that any fix for this should probably be done for other "sacred" core types like String and Array. They do not currently have any local_variables in any Ruby impl, but that could easily change in the future.

headius avatar Jan 16 '15 16:01 headius