From c64a29f6f1e7e7d95193862ab571e2b03f648b34 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 22 Dec 2007 18:23:37 +0000 Subject: 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 --- activesupport/lib/active_support/core_ext/module/introspection.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/lib/active_support/core_ext/module/introspection.rb') 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 local_constants. + def local_constant_names + local_constants.map(&:to_s) + end end -- cgit v1.2.3