Hi,

In message "[ruby-talk:02261] Re: setter() for local variables"
    on 00/03/30, ts <decoux / moulon.inra.fr> writes:

|Y> I've got another idea.  How about making marshaling wrapper for DBD.

| What do you want say with "marshaling wrapper" ?

Something like this

  module DBD
    class Marshal
      def initialize(db)
        @db = db
        @tbl = {}
      end
      def []=(k,v)
        @tbl[k] = v
      end
      def []
        @tbl[k]
      end
      def close
        for k,v in @tbl
          @db[::Mashal::dump(k)] = ::Mashal::dump(v)
        end
        @db.close
    end
  end

..and then,

  db = BDB::Marshal(Btree.open("aa", nil, BDB::CREATE))

Of course, this is a basic outline.  You should add every method of
DBD, and finalizer.  I'd take some time if you like the idea.

							matz.