aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2016-02-28 11:00:14 +0900
committeryui-knk <spiketeika@gmail.com>2016-03-01 20:34:37 +0900
commit86d4e189580e84c4b7effc0c3ebd25b4e8dc4fee (patch)
treee13148aa3d71f77277afbf29f4cf2949800cde09 /activesupport/lib/active_support/core_ext/module
parent0d37f122fc0b697c25d1c31a5a9c310c4328e034 (diff)
downloadrails-86d4e189580e84c4b7effc0c3ebd25b4e8dc4fee.tar.gz
rails-86d4e189580e84c4b7effc0c3ebd25b4e8dc4fee.tar.bz2
rails-86d4e189580e84c4b7effc0c3ebd25b4e8dc4fee.zip
Deprecate `Module.local_constants`
After Ruby 1.9, we can easily get the constants that have been defined locally by `Module.constants(false)`.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module')
-rw-r--r--activesupport/lib/active_support/core_ext/module/introspection.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/introspection.rb b/activesupport/lib/active_support/core_ext/module/introspection.rb
index f1d26ef28f..fa692e1b0e 100644
--- a/activesupport/lib/active_support/core_ext/module/introspection.rb
+++ b/activesupport/lib/active_support/core_ext/module/introspection.rb
@@ -57,6 +57,10 @@ class Module
end
def local_constants #:nodoc:
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
+ Module#local_constants is deprecated and will be removed in Rails 5.1.
+ Use Module#constants(false) instead.
+ MSG
constants(false)
end
end