diff options
author | Matthias H <apoc@sixserv.org> | 2014-03-06 16:07:13 +0100 |
---|---|---|
committer | Matthias H <apoc@sixserv.org> | 2014-03-06 16:07:13 +0100 |
commit | baff61847ea90195e4ef1b063e4da521e02ab9d9 (patch) | |
tree | 72e89e8c43fdeafd4bbbcc86592a706c5148d7f5 /lib/rbot/registry.rb | |
parent | 15be46dbc99df42db41c247967c9c504008de5cf (diff) |
[registry] improved tests, sqlite/tc bugfixes
Diffstat (limited to 'lib/rbot/registry.rb')
-rw-r--r-- | lib/rbot/registry.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rbot/registry.rb b/lib/rbot/registry.rb index 70b450ac..c4e50faf 100644 --- a/lib/rbot/registry.rb +++ b/lib/rbot/registry.rb @@ -222,8 +222,8 @@ class Registry # like Hash#each def each(&block) return nil unless dbexists? - registry.each_key do |key| - block.call(key, self[key]) + registry.each do |key, value| + block.call(key, restore(value)) end end @@ -268,6 +268,7 @@ class Registry end # delete a key from the registry + # returns the value in success, nil otherwise def delete(key) return default unless dbexists? value = registry.delete(key.to_s) |