From 9efca53908c09b7f188183aec6c0a4a2df347316 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Mon, 27 Mar 2006 05:13:46 +0000 Subject: Dependencies cleanup. Fixes #4221. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4060 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/module/loading.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/module/loading.rb (limited to 'activesupport/lib/active_support/core_ext/module/loading.rb') diff --git a/activesupport/lib/active_support/core_ext/module/loading.rb b/activesupport/lib/active_support/core_ext/module/loading.rb new file mode 100644 index 0000000000..36c0c61405 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/module/loading.rb @@ -0,0 +1,13 @@ +class Module + def as_load_path + if self == Object || self == Kernel + '' + elsif is_a? Class + parent == self ? '' : parent.as_load_path + else + name.split('::').collect do |word| + word.underscore + end * '/' + end + end +end \ No newline at end of file -- cgit v1.2.3