aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector
diff options
context:
space:
mode:
authorArthur Nogueira Neves <arthurnn@gmail.com>2014-04-23 11:45:13 -0400
committerArthur Nogueira Neves <arthurnn@gmail.com>2014-04-23 11:45:13 -0400
commit650585da8ac15742b64965c338110e8e859a3b5e (patch)
treefed315611e5dc9bd78c6fa6756fc9875c7649d4c /activesupport/lib/active_support/inflector
parentd10e2ca9f199105849444b39f55d4922339d9c8d (diff)
parent290b83d1cf1722460e53a449fbbc71a6d3f967ac (diff)
downloadrails-650585da8ac15742b64965c338110e8e859a3b5e.tar.gz
rails-650585da8ac15742b64965c338110e8e859a3b5e.tar.bz2
rails-650585da8ac15742b64965c338110e8e859a3b5e.zip
Merge pull request #14840 from akshay-vishnoi/doc_changes
Correct comment [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/inflector')
-rw-r--r--activesupport/lib/active_support/inflector/methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb
index 4a05d678ea..69f77453e7 100644
--- a/activesupport/lib/active_support/inflector/methods.rb
+++ b/activesupport/lib/active_support/inflector/methods.rb
@@ -244,8 +244,8 @@ module ActiveSupport
next candidate if constant.const_defined?(name, false)
next candidate unless Object.const_defined?(name)
- # Go down the ancestors to check it it's owned
- # directly before we reach Object or the end of ancestors.
+ # Go down the ancestors to check if it is owned directly. The check
+ # stops when we reach Object or the end of ancestors tree.
constant = constant.ancestors.inject do |const, ancestor|
break const if ancestor == Object
break ancestor if ancestor.const_defined?(name, false)