diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/registry.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rbot/registry.rb b/lib/rbot/registry.rb index c4e50faf..5e905ebb 100644 --- a/lib/rbot/registry.rb +++ b/lib/rbot/registry.rb @@ -112,11 +112,12 @@ class Registry @registry = nil @default = nil @recovery = nil + @sub_registries = {} end def sub_registry(prefix) path = File.join(@filename.gsub(/\.[^\/\.]+$/,''), prefix.to_s) - return self.class.new(path) + @sub_registries[path] ||= self.class.new(path) end # creates the registry / subregistry folders |