monkey-lib 0.3.5.1 → 0.3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/monkey/autoloader.rb +5 -1
- metadata +1 -1
data/lib/monkey/autoloader.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Monkey
|
|
|
8
8
|
begin
|
|
9
9
|
require file
|
|
10
10
|
if const_defined? const_name
|
|
11
|
-
const = const_get
|
|
11
|
+
const = const_get const_name
|
|
12
12
|
const.extend Monkey::Autoloader
|
|
13
13
|
const
|
|
14
14
|
else
|
|
@@ -16,6 +16,10 @@ module Monkey
|
|
|
16
16
|
raise LoadError
|
|
17
17
|
end
|
|
18
18
|
rescue LoadError
|
|
19
|
+
begin
|
|
20
|
+
return parent.const_get(const_name) if parent != self
|
|
21
|
+
rescue NameError
|
|
22
|
+
end
|
|
19
23
|
super
|
|
20
24
|
end
|
|
21
25
|
end
|