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

- old
+ new

@@ -3,11 +3,17 @@ config.level = Logger::ERROR end ducks = [ [String, DuckPuncher::Ducks::String], - [Enumerable, DuckPuncher::Ducks::Enumerable], - [Array, DuckPuncher::Ducks::Enumerable], + [Enumerable, DuckPuncher::Ducks::Enumerable, { + # Re-include Enumerable in these classes to pick up the new extensions + after: proc { + [Array, Set, Range, Enumerator].each do |k| + DuckPuncher.logger.debug("Sending include to #{k} with Enumerable") and k.send(:include, Enumerable) + end + } + }], [Numeric, DuckPuncher::Ducks::Numeric], [Hash, DuckPuncher::Ducks::Hash], [Object, DuckPuncher::Ducks::Object], [Module, DuckPuncher::Ducks::Module], [Method, DuckPuncher::Ducks::Method, { before: ->(_target) { DuckPuncher::GemInstaller.initialize! } }],