Sha256: ddcef50fd9441381a02be7515e45e39967f745909e0ab0734bf7829597da647f
Contents?: true
Size: 307 Bytes
Versions: 2
Compression:
Stored size: 307 Bytes
Contents
#!/usr/bin/ruby require 'bdb1' db = BDB1::Btree.open "tmp/basic", "w", 0644, "set_pagesize" => 1024, "set_cachesize" => 32 * 1024 File.foreach("wordtest") do |line| line.chomp! db[line] = line.reverse end db.each do |k, v| if k != v.reverse print "ERROR : #{k} -- #{v}\n" end end db.close
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bdb1-0.2.5 | examples/basic.rb |
bdb1-0.2.4 | examples/basic.rb |