lib/puppet/parser/relationship.rb in puppet-2.7.26 vs lib/puppet/parser/relationship.rb in puppet-3.0.0.rc4

- old
+ new

@@ -52,11 +52,9 @@ end unless target_resource = catalog.resource(target) raise ArgumentError, "Could not find resource '#{target}' for relationship from '#{source}'" end Puppet.debug "Adding relationship from #{source} to #{target} with '#{param_name}'" - if source_resource[param_name].class != Array - source_resource[param_name] = [source_resource[param_name]].compact - end + source_resource[param_name] ||= [] source_resource[param_name] << target end end