Issue #6985 has been reported by Dan Bode.
----------------------------------------
Bug #6985: call_indirection_method should forward the options hash to the
indirector
https://projects.puppetlabs.com/issues/6985
Author: Dan Bode
Status: Unreviewed
Priority: Normal
Assignee:
Category: strings
Target version:
Affected Puppet version:
Keywords:
Branch:
The following code from when_invoked specifies that an empty options has will
only be appended when the last argument is not a hash.
<pre>
wrapper = "def #{@name}(*args, &block)
args << {} unless args.last.is_a? Hash
args << block if block_given?
self.__send__(#{internal_name.inspect}, *args)
end"
</pre>
With indirectors, the last argument is always a hash
<pre>
cat_string = Puppet::String[:catalog, '0.0.1']
catalog = nil
if node.class == Puppet::Node
catalog = cat_string.find(node.name, :use_node => node, :ignore_cache=>true)
</pre>
this does not work, b/c the call indirector method pops the hash off (which is
the argument hash if one is provided)
<pre>
def call_indirection_method(method, *args)
options = args.pop
</pre>
--
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.