diff options
author | Vipul A M <vipulnsward@gmail.com> | 2016-07-01 13:20:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 13:20:02 -0700 |
commit | d7a7a2561a6e10f2c82ab06202c88638ca213c6c (patch) | |
tree | 3e26e992e87c56924b460370beb75b7b1ace4162 /activesupport/lib/active_support | |
parent | 0d8d64e9d09cf37ae302fed17f5cd872b4053a4f (diff) | |
parent | 37232f6d43540ff9fb3a88e35070cf7899173ad6 (diff) | |
download | rails-d7a7a2561a6e10f2c82ab06202c88638ca213c6c.tar.gz rails-d7a7a2561a6e10f2c82ab06202c88638ca213c6c.tar.bz2 rails-d7a7a2561a6e10f2c82ab06202c88638ca213c6c.zip |
Merge pull request #25600 from pan/constantize-docfix
fix ActiveSupport::Infector.constantize usage API doc [ci skip]
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 8 |
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 |