Commit 769414b5 authored by Daniel DeLeo's avatar Daniel DeLeo
Browse files

tweak the text formatter to fix hashes in arrays

parent 073f7299
......@@ -72,7 +72,7 @@ class Chef
# Ruby 1.8 Strings include enumberable, which is not what we want. So
# we have this heuristic to detect hashes and arrays instead.
def should_enumerate?(value)
((value.respond_to?(:keys) && !value.empty? ) || ( value.kind_of?(Array) && value.size > 1 ))
((value.respond_to?(:keys) && !value.empty? ) || ( value.kind_of?(Array) && (value.size > 1 || should_enumerate?(value.first) )))
end
def indent_line(string, indent)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment