require 'bdb' db = BDB::Hash.create('r2.db', nil, BDB::CREATE) db['W'] = 'i' db.close db = BDB::Hash.open('r2.db', nil, 'r') db['W'] db.close