]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/dbhash.rb
Whitespace cleanup
[user/henk/code/ruby/rbot.git] / lib / rbot / dbhash.rb
index e687cebf8ee4e2224862348a64a1e9c7f2caaa8b..3168f208f1a30c6601310ccc54b1bb7577fd3967 100644 (file)
@@ -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