From: sayoyo Sayoyo Date: 2008-05-22T02:54:11+09:00 Subject: custom serialization problem 2 (marshal_dump, marshal_load) Hi, I have a problem with the marshal_dump and marshal_load... I built two classes XXX, YYY and implemented both methods like this: class YYY @data = "string" @version = 1 def marshal_dump() return [@version,@data] end def marshal_load(var) @version = var[0] case @version when 1 @data = var[1] else #do something else end end end class XXX @data = Array of YYY @version = 1 def marshal_dump() return [@version,@data] end def marshal_load(var) @version = var[0] case @version when 1 @data = var[1] else #do something else end end end The serialization works correctly when the number of objects YYY is small, but when it got more than 5000, the serialization doesn't work. (the serializaed file has more and less 1 meg) When I try to not to use marshal_dump and marshal_load. the serialization works again???? Can someone tell me, where is the difference between customized serialization and no-customized one??? Thanks you very much Sayoyo -- Posted via http://www.ruby-forum.com/.