summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/runtime/RichInt.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library/scala/runtime/RichInt.scala b/src/library/scala/runtime/RichInt.scala
index ef6f330e71..60264226c3 100644
--- a/src/library/scala/runtime/RichInt.scala
+++ b/src/library/scala/runtime/RichInt.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -18,6 +18,8 @@ final class RichInt(x: Int) extends Proxy with Ordered[Int] {
// Ordered[Int]
def compare (y: Int): Int = if (x < y) -1 else if (x > y) 1 else 0
+ def upto(y: Int): List[Int] = List.range(x, y + 1)
+
def until(y: Int): Iterator[Int] = Iterator.range(x, y)
def to(y: Int): Iterator[Int] = Iterator.range(x, y + 1)