lib/registry.rb in regstry-1.0.8 vs lib/registry.rb in regstry-1.0.9

- old
+ new

@@ -83,10 +83,10 @@ obj.instance_variable_set(:@registry_key, key) registry[key] = obj end def unregister(obj = self) - return unless obj.registry_key + return unless obj.respond_to?(:registry_key) && obj.registry_key registry.delete(obj.registry_key) obj.remove_instance_variable(:@registry_key) end def registered?(key)