Permalink
Browse files

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.
  • Loading branch information...
1 parent 0549ba1 commit ddee206dfb81c216ddc5c78544d305418010abaf @mitio mitio committed Oct 7, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 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+.

0 comments on commit ddee206

Please sign in to comment.