>>>>> "Y" == Yukihiro Matsumoto <matz / netlab.co.jp> writes: Y> I've got another idea. How about making marshaling wrapper for DBD. I've not understood, sorry. Actually I do this : if (dbst->marshal) a = rb_funcall(db_mMarshal, id_dump, 1, a); else { a = rb_funcall(a, id_to_s, 0); } key.data = RSTRING(a)->ptr; key.size = RSTRING(a)->len; and if (dbst->marshal) res = rb_funcall(db_mMarshal, id_load, 1, rb_str_new(a.data, a.size)); else res = rb_tainted_str_new(a.data, a.size); i.e. if the database is open with {"marshal" => true}, I call Marshal#dump and Marshal#load for the key and the value, otherwise I call object#to_s What do you want say with "marshaling wrapper" ? Guy Decoux