From: ts Date: 2002-01-24T19:22:02+09:00 Subject: Re: Problem with Marshal in bdb-0.2.9 >>>>> "A" == Albert Wagner writes: A> /* don't use please */ Yes, there are many comments in bdb :-) A> So then, am I to understand that "_dump" and "_load" do not work in the bdb A> implementation of Marshal? When you write a = BDB::Btree.new(..., "marshal" => true) the result is a delegator, this is the delegator which read and write the object from the db file by calling the singleton methods ::load and ::dump This mean that when you write module BDB class A < Btree extend Marshal end end you have just given two singleton methods (::load and ::dump) to BDB::A and you can write it module BDB class A < Btree class << self def load(a) Marshal.load(a) end def dump(a) Marshal.dump(a) end end end end it will do exactly the same thing. When you call #to_orig you retrieve the original object without its delegator, this mean that if you modify the object the modification will not be in the db file. Guy Decoux