diff options
Diffstat (limited to 'src/library/scala/util/Random.scala')
-rw-r--r-- | src/library/scala/util/Random.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library/scala/util/Random.scala b/src/library/scala/util/Random.scala index 53e721dcda..4169ba3b73 100644 --- a/src/library/scala/util/Random.scala +++ b/src/library/scala/util/Random.scala @@ -94,7 +94,8 @@ class Random(val self: java.util.Random) { * from the ASCII range 33-126. */ def nextPrintableChar(): Char = { - val (low, high) = (33, 126) + val low = 33 + val high = 127 (self.nextInt(high - low) + low).toChar } |