Hi,
In message "[ruby-talk:02295] Re: setter() for local variables"
on 00/03/31, ts <decoux / moulon.inra.fr> writes:
|
|Y> def []=(k,v)
|Y> @tbl[k] = v
|Y> end
|
| This mean that the whole database is in memory (and not on the disk), no ?
By this proof-of-concept code, yes. You can do like:
def []=(k,v)
@tbl[k] = v
@db[::Mashal::dump(k)] = ::Mashal::dump(v)
end
I'm not sure if it's better.
matz.