lib/bcx/response_error.rb in bcx-1.0.0 vs lib/bcx/response_error.rb in bcx-1.1.0

- old
+ new

@@ -25,10 +25,14 @@ return body if body.kind_of?(String) messages = [] body.each_pair do |attribute, msgs| - msgs.each { |msg| messages.push "#{attribute} #{msg}" } + if msgs.respond_to? :each + msgs.each { |msg| messages.push "#{attribute} #{msg}" } + else + messages.push "#{attribute} #{msgs.to_s}" + end end messages.join(', ') end