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 <je...@puppetlabs.com>
Signed-off-by: Matt Robinson <m...@puppetlabs.com>
---
Local-branch: ticket/next/6830-ready_to_merge
 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 40ee8f2..2da713c 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
 
-- 
1.7.3.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to