Open nanaya opened 6 years ago
Is the user supposed to define their own #marshal_dump so it can work with Marshal?
#marshal_dump
Marshal
NullObject = Naught.build { |c| c.black_hole } # fails because marshal_dump returns itself and triggers recursive loop failsafe Marshal.load(Marshal.dump(NullObject.new)) NullObjectWithDump = Naught.build do |c| c.black_hole def marshal_dump end end # works Marshal.load(Marshal.dump(NullObjectWithDump.new))
Is the user supposed to define their own
#marshal_dump
so it can work withMarshal
?