lib/duck_puncher/registration.rb in duck_puncher-4.2.1 vs lib/duck_puncher/registration.rb in duck_puncher-4.2.2

- old
+ new

@@ -2,10 +2,10 @@ # @note When updating this file please update comment regarding this module in duck_puncher.rb module Registration def register(target, *mods) options = mods.last.is_a?(Hash) ? mods.pop : {} target = DuckPuncher.lookup_constant target - Ducks.list[target] = [] unless Ducks.list.key?(target) + Ducks.list[target] = Set.new [] unless Ducks.list.key?(target) Array(mods).each do |mod| duck = Duck.new target, mod, options Ducks.list[target] << duck decorators[target] = build_decorator_class(duck, *Ducks[target]) end