From eb40966777beaff2ceca8b91e10e3cb0132ec218 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 16 Jun 2009 13:25:07 -0500 Subject: 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 --- lib/puppet/util/autoload.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/puppet/util/autoload.rb') 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 -- cgit