lib/registry.rb in regstry-1.0.12 vs lib/registry.rb in regstry-1.0.13
- old
+ new
@@ -76,10 +76,10 @@
module ClassMethods
attr_reader :registry_key
def register(*args)
- obj = !args.last.is_a?(Symbol) ? args.pop : self
+ obj = !(args.last.is_a?(Symbol) || args.last.is_a?(String)) ? args.pop : self
args.reverse.map(&:to_sym).each do |key|
obj.instance_variable_set(:@registry_key, key)
registry[key] = obj
end
end