summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/autoload.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-16 13:25:07 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-07-16 21:23:03 +1000
commiteb40966777beaff2ceca8b91e10e3cb0132ec218 (patch)
tree006e5f960ee4da5391672b972aa8ab5e5d9a4825 /lib/puppet/util/autoload.rb
parenta42e8788b1fde5273ba1e34f6d90c451394849b8 (diff)
downloadpuppet-eb40966777beaff2ceca8b91e10e3cb0132ec218.tar.gz
puppet-eb40966777beaff2ceca8b91e10e3cb0132ec218.tar.xz
puppet-eb40966777beaff2ceca8b91e10e3cb0132ec218.zip
Ruby no longer clobbers puppet autoloading
We basically just make sure that we tell Ruby about files we've loaded, so you can 'require' these files and doing so will essentially no-op, rather than clobbering the already-loaded code. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/util/autoload.rb')
-rw-r--r--lib/puppet/util/autoload.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index fb15adf92..b48e3afa1 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -42,6 +42,7 @@ class Puppet::Util::Autoload
# we can load downloaded plugins if they've already been loaded
# into memory.
def self.loaded(file)
+ $" << file + ".rb" unless $".include?(file)
@loaded << file unless @loaded.include?(file)
end