Skip to content

Commit b52227d

Browse files
authored
Merge pull request #122 from SethTisue/fix-string-lines
use .linesIterator to work around scala/bug#11125
2 parents 675831f + 9a98a9d commit b52227d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fnGen/WrapFnGen.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ object WrapFnGen {
5858
}
5959

6060
implicit class SplitMyLinesAndStuff(s: String) {
61-
def toVec = s.lines.toVector
61+
def toVec = s.linesIterator.toVector
6262
def nonBlank = s.trim.length > 0
6363
}
6464

6565
implicit class TreeToText(t: Tree) {
66-
def text = showCode(t).replace("$", "").lines.toVector
66+
def text = showCode(t).replace("$", "").linesIterator.toVector
6767
}
6868

6969
case class Prioritized(lines: Vector[String], priority: Int) {
@@ -288,7 +288,7 @@ object WrapFnGen {
288288
def sameText(f: java.io.File, text: String): Boolean = {
289289
val x = scala.io.Source.fromFile(f)
290290
val lines = try { x.getLines.toVector } finally { x.close }
291-
lines.iterator.filter(_.nonBlank) == text.lines.filter(_.nonBlank)
291+
lines.iterator.filter(_.nonBlank) == text.linesIterator.filter(_.nonBlank)
292292
}
293293

294294
def write(f: java.io.File, text: String): Unit = {

0 commit comments

Comments
 (0)