This project is closed and read-only.
Actions
Feature #7631
closedbug report
Feature #7631:
bug report
Status:
Closed
Assignee:
-
Actions
This project is closed and read-only.
Added by dvrmdmr (demir demir) over 13 years ago. Updated about 7 years ago.
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.