summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-05 11:23:43 +0000
committerPaul Phillips <paulp@improving.org>2009-09-05 11:23:43 +0000
commitfd1eba71450b3d60fd02dba22f951a32485629d8 (patch)
tree7530ef1f6190a66b4734c63760aee1afd3bb8e96 /src/library
parent0ae9ca5d2406efe2df10824beb192d958ee2c82e (diff)
downloadscala-fd1eba71450b3d60fd02dba22f951a32485629d8.tar.gz
scala-fd1eba71450b3d60fd02dba22f951a32485629d8.tar.bz2
scala-fd1eba71450b3d60fd02dba22f951a32485629d8.zip
Minor refinements to recent patches, and the re...
Minor refinements to recent patches, and the reversion of times. "It was the best of times... it was the reversion of times..."
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/runtime/RichInt.scala17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/library/scala/runtime/RichInt.scala b/src/library/scala/runtime/RichInt.scala
index 0c950cef8d..47d4b458c1 100644
--- a/src/library/scala/runtime/RichInt.scala
+++ b/src/library/scala/runtime/RichInt.scala
@@ -32,23 +32,6 @@ final class RichInt(val start: Int) extends Proxy with Ordered[Int] {
def max(that: Int): Int = if (start > that) start else that
def abs: Int = if (start < 0) -start else start
- /** Execute a block of code this many times.
- * For instance: 5 times { println("hello") }
- *
- * N.B. this way of repeatedly executing an action has
- * far superior performance to any other approach in the
- * library. It's not just syntactic sugar, it is faster
- * than anything but a locally implemented while loop and
- * of course less error prone than the while loop.
- */
- def times(body: => Unit) {
- var i = 0
- while (i < start) {
- body
- i += 1
- }
- }
-
def toBinaryString: String = java.lang.Integer.toBinaryString(start)
def toHexString: String = java.lang.Integer.toHexString(start)
def toOctalString: String = java.lang.Integer.toOctalString(start)