Issue #18041 has been reported by Josh Cooper.
----------------------------------------
Bug #18041: Puppet::Util::Autoload.list_loaded is broken
https://projects.puppetlabs.com/issues/18041
Author: Josh Cooper
Status: Accepted
Priority: Normal
Assignee:
Category:
Target version: 3.0.2
Affected Puppet version: 0.24.0
Keywords: autoload
Branch:
The `list_loaded` method does:
<pre>
loaded.keys.sort { |a,b| a[0] <=> b[0] }.collect do |path, hash|
"#{path}: #{hash[:file]}"
end
</pre>
The method was added in `7befe1bc`, but was broken in `6700adcacd`, because the
code that adds autoloaded files to the hash uses a different hashkey. Calling
this method results in:
<pre>
1.8.7 :011 > loader.class.list_loaded
NoMethodError: undefined method `[]' for nil:NilClass
from /Users/josh/work/puppet/lib/puppet/util/autoload.rb:25:in
`list_loaded'
from /Users/josh/work/puppet/lib/puppet/util/autoload.rb:24:in `collect'
from /Users/josh/work/puppet/lib/puppet/util/autoload.rb:24:in
`list_loaded'
from (irb):11
</pre>
Since this method blows up if called, it is safe to remove.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.