diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 7b3878d222..bf8d328020 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -692,7 +692,8 @@ NOTE: Defined in +active_support/core_ext/module/introspection.rb+. h4. Constants -The method +local_constants+ returns the names of the constants that have been defined in the receiver module: +The method +local_constants+ returns the names of the constants that have been +defined in the receiver module: <ruby> module X @@ -708,7 +709,8 @@ X.local_constants # => [:X1, :X2, :Y] X::Y.local_constants # => [:Y1, :X1] </ruby> -The names are returned as symbols. The method +local_constant_names+ always returns strings. +The names are returned as symbols. (The method +local_constant_names+ returns +strings, but +local_constant_names+ is deprecated.) NOTE: Defined in +active_support/core_ext/module/introspection.rb+. |