Feature #7631
closed
If marshal_dump method is defined in a class and you pass an instance of that class into Marshal.dump, instead of dumping instance variables (as it happens by default, when marshal_dump is not defined) Ruby dumps only data returned from this method.
Though, if the class is a Struct, MRI 1.8.7 behaves the same way as for a regular class, but both MRI 1.9.3 and MRI 2.0.0 in addition to the data returned from marshal_dump method automatically dump instance variables of the object.
- Tracker changed from Bug to Feature
- Project changed from 3 to Backport187
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0