summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2007-10-31 17:11:36 +0000
committerIulian Dragos <jaguarul@gmail.com>2007-10-31 17:11:36 +0000
commit9e8c022640f74e963baa930dd657d920a914a43d (patch)
treef44203e2b0e0ce91835bd3e5e5a54b045afaa6c5 /src
parent85f19da7d2d82f6987fd9bbbc3438568e4255cd3 (diff)
downloadscala-9e8c022640f74e963baa930dd657d920a914a43d.tar.gz
scala-9e8c022640f74e963baa930dd657d920a914a43d.tar.bz2
scala-9e8c022640f74e963baa930dd657d920a914a43d.zip
Fixed ticket #181, iterables are now correctly ...
Fixed ticket #181, iterables are now correctly ordered when the first one is a prefix of the other.
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/Predef.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index a83200fbd8..04d388ce17 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -193,7 +193,10 @@ object Predef {
val those = that.elements
while (res == 0 && these.hasNext)
res = if (those.hasNext) these.next compare those.next else 1
- res
+ if (res == 0) {
+ if (those.hasNext) -1 else 0
+ } else
+ res
}
}