diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-03-26 10:01:26 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-03-29 10:59:08 -0700 |
| commit | a520c5e3f6cbb06b5902b3021db6b024b085408a (patch) | |
| tree | ee9fb0235677ced008578ef761e5f5e96f675bd7 /lib/puppet | |
| parent | 85f3b767e8279188e5a0a594a21b7677126ed664 (diff) | |
| download | puppet-a520c5e3f6cbb06b5902b3021db6b024b085408a.tar.gz puppet-a520c5e3f6cbb06b5902b3021db6b024b085408a.tar.xz puppet-a520c5e3f6cbb06b5902b3021db6b024b085408a.zip | |
(#6830) Handle case where array is actually a string
Another case where in Ruby 1.8 you can call enumerable methods on
strings that you can't in Ruby 1.9.
undefined method `collect' for "dev2 dev1":String
Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/type/zpool.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/type/zpool.rb b/lib/puppet/type/zpool.rb index 40ee8f286..2da713c2b 100755 --- a/lib/puppet/type/zpool.rb +++ b/lib/puppet/type/zpool.rb @@ -4,6 +4,7 @@ module Puppet class VDev < Property def flatten_and_sort(array) + array = [array] unless array.is_a? Array array.collect { |a| a.split(' ') }.flatten.sort end |
