summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/autoload.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/util/autoload.rb')
-rw-r--r--lib/puppet/util/autoload.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index 280961837..a52575522 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -107,16 +107,11 @@ class Puppet::Util::Autoload
# Load every instance of everything we can find.
eachdir do |dir|
Dir.glob("#{dir}/*.rb").each do |file|
- # Load here, rather than require, so that facts
- # can be reloaded. This has some short-comings, I
- # believe, but it works as long as real classes
- # aren't used.
name = File.basename(file).sub(".rb", '').intern
next if loaded?(name)
- next if $".include?(File.join(@path, name.to_s + ".rb"))
- filepath = File.join(@path, name.to_s + ".rb")
+ rubypath = File.join(@path, name.to_s)
begin
- Kernel.require file
+ Kernel.require rubypath
loaded(name, file)
rescue => detail
if Puppet[:trace]