From 5b782ac56a362ddd65ead76bd4bfe751d8dd3613 Mon Sep 17 00:00:00 2001 From: buraq Date: Fri, 16 Apr 2004 15:43:48 +0000 Subject: fixed increment in Iterator.fromString --- sources/scala/Iterator.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/scala/Iterator.scala b/sources/scala/Iterator.scala index f8cc965355..483c149c9b 100644 --- a/sources/scala/Iterator.scala +++ b/sources/scala/Iterator.scala @@ -38,7 +38,7 @@ object Iterator { private var i = 0; private val len = str.length(); def hasNext = i < len; - def next = str charAt i; + def next = { val c = str charAt i; i = i + 1; c }; } def range(lo: Int, end: Int) = new Iterator[Int] { -- cgit v1.2.3