diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -185,6 +185,10 @@ module ActiveSupport
         @new_const = new_const
       end
 
+      def class
+        target.class
+      end
+
       private
         def target
           @new_const.to_s.constantize
Pass class through to DeprecatedConstantProxy target

This is needed because include_all_modules_from checks
calls "class" on every constant and sometimes it can
hit deprecated constants which aren't even Modules,
but while checking for it deprecation warnings are shown.