diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-01 20:29:47 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-01 20:29:47 +0000 |
commit | 89f3533a2f43547c1478d6bdcd8df35742cf9bf9 (patch) | |
tree | 6c1cc898758159609c4870829cddabb34ea6cc75 | |
parent | ff86078200fea24ad86b402438058fef032ec73f (diff) | |
download | scala-89f3533a2f43547c1478d6bdcd8df35742cf9bf9.tar.gz scala-89f3533a2f43547c1478d6bdcd8df35742cf9bf9.tar.bz2 scala-89f3533a2f43547c1478d6bdcd8df35742cf9bf9.zip |
Don't let stringOf lose elements to print by ha...
Don't let stringOf lose elements to print by hanging onto set semantics
for too long. Closes #3944, no review.
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index 0dd51a0fc7..1ea95d3814 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -271,7 +271,7 @@ object ScalaRunTime { case null => "null" case x if useOwnToString(x) => x.toString case x: AnyRef if isArray(x) => WrappedArray make x take maxElements map inner mkString ("Array(", ", ", ")") - case x: Traversable[_] => x take maxElements map inner mkString (x.stringPrefix + "(", ", ", ")") + case x: Traversable[_] => x.toIterator take maxElements map inner mkString (x.stringPrefix + "(", ", ", ")") case x: Product1[_] if isTuple(x) => "(" + inner(x._1) + ",)" // that special trailing comma case x: Product if isTuple(x) => x.productIterator map inner mkString ("(", ",", ")") case x => x toString |