aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/introspection.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-22 18:23:37 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-22 18:23:37 +0000
commitc64a29f6f1e7e7d95193862ab571e2b03f648b34 (patch)
treed5a2cef426af9cda65e68ef3f29305170527a96e /activesupport/lib/active_support/core_ext/module/introspection.rb
parent8b5f4e474f30560da85f52dd64dc3b45d0338b93 (diff)
downloadrails-c64a29f6f1e7e7d95193862ab571e2b03f648b34.tar.gz
rails-c64a29f6f1e7e7d95193862ab571e2b03f648b34.tar.bz2
rails-c64a29f6f1e7e7d95193862ab571e2b03f648b34.zip
Ruby 1.9 compat: dependencies uses Module#local_constant_names. References #1689 [Frederick Cheung]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/introspection.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/module/introspection.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/introspection.rb b/activesupport/lib/active_support/core_ext/module/introspection.rb
index 36481927aa..7e4d8e44fc 100644
--- a/activesupport/lib/active_support/core_ext/module/introspection.rb
+++ b/activesupport/lib/active_support/core_ext/module/introspection.rb
@@ -32,4 +32,10 @@ class Module
! inherited.key?(const) || inherited[const].object_id != const_get(const).object_id
end
end
+
+ # Returns the names of the constants defined locally rather than the
+ # constants themselves. See <tt>local_constants</tt>.
+ def local_constant_names
+ local_constants.map(&:to_s)
+ end
end