Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fb16a2f9bc
Fetching contributors…

Cannot retrieve contributors at this time

file 16 lines (9 sloc) 0.244 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

require 'rubygems'
require 'rufus/tokyo'

db = Rufus::Tokyo::Cabinet.new('data.tch')

db['nada'] = 'surf'

p db['nada'] # => 'surf'
p db['lost'] # => nil

5000.times { |i| db[i.to_s] = "x" }

p db.inject { |r, (k, v)| k } # => 4999

db.close
Something went wrong with that request. Please try again.