From: ts Date: 2002-07-23T21:59:58+09:00 Subject: Re: bdb and $= >>>>> "T" == Tom Gilbert writes: T> Hrm. I have a feeling the only way I could use this would be to tolower! T> every key, right? But wouldn't that mean that the case information was T> lost in the db itself? yes, T> e.g, I want to store a key "Fred Jones", but be able to lookup "fred T> jones", and still have it display as "Fred Jones", if you see what I T> mean.. Try this : pigeon% cat b.rb #!/usr/bin/ruby require 'bdb' module BDB class A < Btree def bdb_bt_compare(a, b) a.downcase <=> b.downcase end end end db = BDB::A.open "basic", nil, "w" db["Fred Jones"] = "abc" p db["fred jones"] p db.keys pigeon% pigeon% b.rb "abc" ["Fred Jones"] pigeon% Guy Decoux