aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-08-23 19:12:14 +0300
committerTarmo Tänav <tarmo@itech.ee>2008-08-23 19:12:14 +0300
commit5232d812819d1d44187a54cb025835b1f9cb2296 (patch)
treefb2b111249cce2168d98e34b5c1dc7820189c9e0
parentcf28109158054fbab91de2d6d86efe1b40e68d93 (diff)
downloadrails-5232d812819d1d44187a54cb025835b1f9cb2296.tar.gz
rails-5232d812819d1d44187a54cb025835b1f9cb2296.tar.bz2
rails-5232d812819d1d44187a54cb025835b1f9cb2296.zip
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.
-rw-r--r--activesupport/lib/active_support/deprecation.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index ebdaf86146..01eb5df593 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