From 4fbc14055183beca2de5b2881a35d13c2d6d067d Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Mon, 7 Dec 2009 18:54:01 -0800 Subject: [PATCH] Better descriptions for CPArray. Reviewed by me. --- Foundation/CPArray.j | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Foundation/CPArray.j b/Foundation/CPArray.j index 66b6a266f..f997d2e26 100755 --- a/Foundation/CPArray.j +++ b/Foundation/CPArray.j @@ -816,15 +816,18 @@ for(; index < count; ++index) { - var object = self[index]; + if (index === 0) + description += '\n'; - if (object && object.isa) - description += [object description]; - else - description += object; + var object = self[index], + objectDescription = object && object.isa ? [object description] : object + ""; + + description += "\t" + objectDescription.split('\n').join("\n\t"); if (index !== count - 1) description += ", "; + + description += '\n'; } return description + ')';