lib/rbbt/util/misc/objects.rb in rbbt-util-5.14.38 vs lib/rbbt/util/misc/objects.rb in rbbt-util-5.14.39

- old
+ new

@@ -49,10 +49,10 @@ end current end def self.zip_fields(array) - return [] if array.empty? or (first = array.first).nil? + return [] if array.nil? or array.empty? or (first = array.first).nil? max = array.collect{|l| l.length}.max rest = array[1..-1].collect{|v| v.length == 1 & max > 1 ? v * max : v } first = first * max if first.length == 1 and max > 1