aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/loading.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/loading.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/module/loading.rb13
1 files changed, 13 insertions, 0 deletions
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