X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Fdbhash.rb;h=3168f208f1a30c6601310ccc54b1bb7577fd3967;hb=1676abaf61c9b6c40714e00d6637e3a73d8b527b;hp=e687cebf8ee4e2224862348a64a1e9c7f2caaa8b;hpb=5b55193a4263464efd71279dddf57a1a14dd22e4;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/lib/rbot/dbhash.rb b/lib/rbot/dbhash.rb index e687cebf..3168f208 100644 --- a/lib/rbot/dbhash.rb +++ b/lib/rbot/dbhash.rb @@ -10,7 +10,10 @@ end module BDB class CIBtree < Btree def bdb_bt_compare(a, b) - a.downcase <=> b.downcase + if a == nil || b == nil + debug "CIBTree: WARNING: comparing #{a.inspect} (#{self[a].inspect}) with #{b.inspect} (#{self[b].inspect})" + end + (a||'').downcase <=> (b||'').downcase end end end