From: ts Date: 2000-03-28T13:03:47+02:00 Subject: [ruby-talk:02213] *DBM#invert classes *DBM has a method #invert, but this method don't seem to work or I've not understood how to use it : pigeon% cat b.rb #!/usr/bin/ruby require "gdbm" dbm = GDBM.open("toto") dbm["a"] = "1" dbm["b"] = "2" dbm.each { |x, y| print "#{x}--#{y}\n" } mbd = dbm.invert mbd.each { |x, y| print "#{x}--#{y}\n" } dbm.close pigeon% b.rb a--1 b--2 a--1 b--2 pigeon% Guy Decoux