aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDimitar Dimitrov <wireman@gmail.com>2011-10-07 03:14:59 +0300
committerDimitar Dimitrov <wireman@gmail.com>2011-10-07 03:14:59 +0300
commitddee206dfb81c216ddc5c78544d305418010abaf (patch)
tree7e7a7478c2a0900df97bbd5eb10097055bba0dee /railties
parent0549ba10b30dc2b4d669f53359b67dd17c2ca6a6 (diff)
downloadrails-ddee206dfb81c216ddc5c78544d305418010abaf.tar.gz
rails-ddee206dfb81c216ddc5c78544d305418010abaf.tar.bz2
rails-ddee206dfb81c216ddc5c78544d305418010abaf.zip
More understandable warning in the local_constant_names section
Rewrite the warning about local_constant_names in Ruby 1.8 to make it more understandable. Word ordering fixes in the same section.
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 5aee001545..addf5f78be 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -719,9 +719,9 @@ X.local_constants # => ["X2", "X1", "Y"], assumes Ruby 1.8
X::Y.local_constants # => ["X1", "Y1"], assumes Ruby 1.8
</ruby>
-The names are returned as strings in Ruby 1.8, and as symbols in Ruby 1.9. The method +local_constant_names+ returns always strings.
+The names are returned as strings in Ruby 1.8, and as symbols in Ruby 1.9. The method +local_constant_names+ always returns strings.
-WARNING: This method is exact if running under Ruby 1.9. In previous versions it may miss some constants if their value in some ancestor stores the exact same object than in the receiver.
+WARNING: This method returns precise results in Ruby 1.9. In older versions of Ruby, however, it may miss some constants in case the same constant exists in the receiver module as well as in any of its ancestors and both constants point to the same object (objects are compared using +Object#object_id+).
NOTE: Defined in +active_support/core_ext/module/introspection.rb+.