Since required_features can (and frequently does) return a single item instead of an Array, the error message needed to be more robust.
Signed-off-by: Markus Roberts <[email protected]> --- lib/puppet/property.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/property.rb b/lib/puppet/property.rb index 1ed323f..abbc71c 100644 --- a/lib/puppet/property.rb +++ b/lib/puppet/property.rb @@ -1,4 +1,4 @@ - # The virtual base class for properties, which are the self-contained building +# The virtual base class for properties, which are the self-contained building # blocks for actually doing work on the system. require 'puppet' @@ -384,7 +384,7 @@ class Puppet::Property < Puppet::Parameter # Make sure that we've got all of the required features for a given value. def validate_features_per_value(value) if features = self.class.value_option(self.class.value_name(value), :required_features) - raise ArgumentError, "Provider must have features '%s' to set '%s' to '%s'" % [features.collect { |f| f.to_s }.join(", "), self.class.name, value] unless provider.satisfies?(features) + raise ArgumentError, "Provider must have features '%s' to set '%s' to '%s'" % [[features].flatten.join(", "), self.class.name, value] unless provider.satisfies?(features) end end -- 1.6.4 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en -~----------~----~----~----~------~----~------~--~---
