aboutsummaryrefslogtreecommitdiffstats
path: root/guides
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 /guides
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 'guides')
-rw-r--r--guides/source/active_support_core_extensions.md23
1 files changed, 0 insertions, 23 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index e66b9a4301..b994c863d1 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -709,29 +709,6 @@ M.parents # => [X::Y, X, Object]
NOTE: Defined in `active_support/core_ext/module/introspection.rb`.
-### Constants
-
-The method `local_constants` returns the names of the constants that have been
-defined in the receiver module:
-
-```ruby
-module X
- X1 = 1
- X2 = 2
- module Y
- Y1 = :y1
- X1 = :overrides_X1_above
- end
-end
-
-X.local_constants # => [:X1, :X2, :Y]
-X::Y.local_constants # => [:Y1, :X1]
-```
-
-The names are returned as symbols.
-
-NOTE: Defined in `active_support/core_ext/module/introspection.rb`.
-
#### Qualified Constant Names
The standard methods `const_defined?`, `const_get`, and `const_set` accept