diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2013-01-14 18:41:55 -0800 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2013-01-14 18:41:55 -0800 |
commit | 2559be9258881f93edb45b9a25100f33cf0aa9c5 (patch) | |
tree | 92eeadaba1b6c07ec56efd42789446e287368a64 /lib/puppet/parser | |
parent | 9dfc58327bcf0d54a74d0425bf62fa593ae10829 (diff) | |
parent | 2a28ece233262e2c94f8f608bf900b7801c06c9a (diff) | |
download | puppet-stdlib-2559be9258881f93edb45b9a25100f33cf0aa9c5.tar.gz puppet-stdlib-2559be9258881f93edb45b9a25100f33cf0aa9c5.tar.bz2 |
Merge branch 'fix/master/getparam_failure'
* fix/master/getparam_failure:
(maint) Fix getparam() spec failure on MRI 1.8
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/getparam.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/getparam.rb b/lib/puppet/parser/functions/getparam.rb index 0962656..6d51006 100644 --- a/lib/puppet/parser/functions/getparam.rb +++ b/lib/puppet/parser/functions/getparam.rb @@ -25,6 +25,8 @@ ENDOFDOC raise(ArgumentError, 'Must specify a reference') unless reference raise(ArgumentError, 'Must specify name of a parameter') unless param and param.instance_of? String + return '' if param.empty? + if resource = findresource(reference.to_s) return resource[param] if resource[param] end |