summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntoine Gourlay <antoine@gourlay.fr>2014-06-29 16:42:14 +0200
committerAntoine Gourlay <antoine@gourlay.fr>2014-06-29 16:51:51 +0200
commit4e29e9a229c5a13e8517fe034668aa97ae102eec (patch)
tree70f173930faacc2733dc38199e3f32c7a6e5c46e /src
parentfbfce33cb03bc2b41dd0f46fa9f4630036b4f2ca (diff)
downloadscala-4e29e9a229c5a13e8517fe034668aa97ae102eec.tar.gz
scala-4e29e9a229c5a13e8517fe034668aa97ae102eec.tar.bz2
scala-4e29e9a229c5a13e8517fe034668aa97ae102eec.zip
SI-8690 BufferedSource.mkString mistakenly skipped the first char.
mkString is overriden in BufferedSource for performance, but the implementation always used the wrong reader. This seems to be a typo (`allReader` is declared 5 lines earlier but never used, `charReader` is used in its place).
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/io/BufferedSource.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/io/BufferedSource.scala b/src/library/scala/io/BufferedSource.scala
index 1c87a1f421..52fa525b24 100644
--- a/src/library/scala/io/BufferedSource.scala
+++ b/src/library/scala/io/BufferedSource.scala
@@ -93,7 +93,7 @@ class BufferedSource(inputStream: InputStream, bufferSize: Int)(implicit val cod
val buf = new Array[Char](bufferSize)
var n = 0
while (n != -1) {
- n = charReader.read(buf)
+ n = allReader.read(buf)
if (n>0) sb.appendAll(buf, 0, n)
}
sb.result