summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-05-10 08:19:13 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-05-10 08:19:13 +0200
commitf52f485ae68a62cd6183224ba535c88a35928768 (patch)
treea12b4058b3bad49852f493e891a3fd73e14dc736 /lib
parent29f36f867923faccc8e99863e059ee4a36b279b3 (diff)
bdb: don't retrieve the db values when warning about nil key
When either of the keys passed to the BDB compare function is nil, we emit a warning. In this warning, however, we used to peek at the registry value, which required the use of the comparison function itself, falling in a nested loop. Solve by omitting the self[<key>].inspect from the warning.
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/registry/bdb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/registry/bdb.rb b/lib/rbot/registry/bdb.rb
index d1876ac5..2403ec0e 100644
--- a/lib/rbot/registry/bdb.rb
+++ b/lib/rbot/registry/bdb.rb
@@ -36,7 +36,7 @@ module BDB
class CIBtree < Btree
def bdb_bt_compare(a, b)
if a == nil || b == nil
- warning "CIBTree: comparing #{a.inspect} (#{self[a].inspect}) with #{b.inspect} (#{self[b].inspect})"
+ warning "CIBTree: comparing key #{a.inspect} with #{b.inspect}"
end
(a||'').downcase <=> (b||'').downcase
end