From: Robert Klemme Date: 2009-03-01T00:19:43+09:00 Subject: Re: Marshal.load does not create new instances? 2009/2/28 Pit Capitain : > 2009/2/28 Ian Trudel : >> (...) >> Any more suggestion? > > Ian, I'm not sure I understand what you want. AFAIK Marshal only works > if you have the same class definitions on both sides. Why is this a > problem for you? I believe he wants to evolve the class and be able to load data written with an older (or just different) version of the class. And now Ian hits the usual problems of schema migration. Ian, you should be aware of one thing: class definitions are not serialized - no programming language that I know does this. And there are probably good reasons (security, efficiency probably). You can use tricks as 7stud suggested although I feel wary about this. I would probably choose a different solution based on the requirements (which are not fully clear to me). If you just need changing sets of attributes then these options might work: 1. use OpenStruct 2. use Hash 3. change your class Data to store attributes in a single Hash only There might be other and if you provide more of your requirements we might come up with other solutions. Kind regards robert -- remember.guy do |as, often| as.you_can - without end