diff options
author | Xavier Noria <fxn@hashref.com> | 2012-10-07 11:50:50 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-10-07 11:52:47 +0200 |
commit | 918f7038b3d4d4180a4d1056bb4b7b3f3b85508f (patch) | |
tree | d82cd5163dac6372703be8595436db97c4567694 /activesupport | |
parent | e0deb0e89b15d2d7fc3b5a19f8a9969895479891 (diff) | |
download | rails-918f7038b3d4d4180a4d1056bb4b7b3f3b85508f.tar.gz rails-918f7038b3d4d4180a4d1056bb4b7b3f3b85508f.tar.bz2 rails-918f7038b3d4d4180a4d1056bb4b7b3f3b85508f.zip |
explains why these requires are in an unusual place
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index b732c17e0f..6c15fffc0f 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -4,6 +4,14 @@ module ActiveSupport # \Deprecation specifies the API used by Rails to deprecate methods, instance # variables, objects and constants. class Deprecation + # active_support.rb sets an autoload for ActiveSupport::Deprecation. + # + # If these requires were at the top of the file the constant would not be + # defined by the time their files were loaded. Since some of them reopen + # ActiveSupport::Deprecation its autoload would be triggered, resulting in + # a circular require warning for active_support/deprecation.rb. + # + # So, we define the constant first, and load dependencies later. require 'active_support/deprecation/instance_delegator' require 'active_support/deprecation/behaviors' require 'active_support/deprecation/reporting' |