Skip to content

Commit

Permalink
Pass class through to DeprecatedConstantProxy target
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tarmo committed Aug 23, 2008
1 parent cf28109 commit 5232d81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activesupport/lib/active_support/deprecation.rb
Expand Up @@ -185,6 +185,10 @@ def initialize(old_const, new_const)
@new_const = new_const
end

def class
target.class
end

private
def target
@new_const.to_s.constantize
Expand Down

0 comments on commit 5232d81

Please sign in to comment.