aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorPan GaoYong <pan.gaoyong@gmail.com>2016-06-30 22:34:41 +0800
committerPan GaoYong <pan.gaoyong@gmail.com>2016-06-30 22:37:49 +0800
commit37232f6d43540ff9fb3a88e35070cf7899173ad6 (patch)
tree504cddc3f221faa9cd02877ef62d56ebdb753cd2 /activesupport/lib
parentb63f70572dd8528d464c473ce33e25fbc54777a2 (diff)
downloadrails-37232f6d43540ff9fb3a88e35070cf7899173ad6.tar.gz
rails-37232f6d43540ff9fb3a88e35070cf7899173ad6.tar.bz2
rails-37232f6d43540ff9fb3a88e35070cf7899173ad6.zip
fix ActiveSupport::Infector.constantize usage API doc [ci skip]
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/inflector/methods.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb
index f94e12e14f..f14b8b81b7 100644
--- a/activesupport/lib/active_support/inflector/methods.rb
+++ b/activesupport/lib/active_support/inflector/methods.rb
@@ -238,8 +238,8 @@ module ActiveSupport
# Tries to find a constant with the name specified in the argument string.
#
- # 'Module'.constantize # => Module
- # 'Foo::Bar'.constantize # => Foo::Bar
+ # constantize('Module') # => Module
+ # constantize('Foo::Bar') # => Foo::Bar
#
# The name is assumed to be the one of a top-level constant, no matter
# whether it starts with "::" or not. No lexical context is taken into
@@ -248,8 +248,8 @@ module ActiveSupport
# C = 'outside'
# module M
# C = 'inside'
- # C # => 'inside'
- # 'C'.constantize # => 'outside', same as ::C
+ # C # => 'inside'
+ # constantize('C') # => 'outside', same as ::C
# end
#
# NameError is raised when the name is not in CamelCase or the constant is