1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

fix formats tests to handle empty array

This commit is contained in:
geemus 2011-01-21 15:32:46 -08:00
parent 825f60c7aa
commit 9a0606e938

View file

@ -39,7 +39,7 @@ module Shindo
case value case value
when Array when Array
valid &&= datum.is_a?(Array) valid &&= datum.is_a?(Array)
if datum.is_a?(Array) if datum.is_a?(Array) && !value.empty?
for element in datum for element in datum
type = value.first type = value.first
if type.is_a?(Hash) if type.is_a?(Hash)