summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/bignum.c b/bignum.c
index ddb1636d69..fbf293de83 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1675,14 +1675,10 @@ rb_big_abs(x)
return x;
}
-/* !!!warnig!!!!
- this is not really a random number!!
-*/
-
VALUE
-rb_big_rand(max, rand)
+rb_big_rand(max, rand_buf)
VALUE max;
- double rand;
+ double *rand_buf;
{
VALUE v;
long len;
@@ -1690,7 +1686,7 @@ rb_big_rand(max, rand)
len = RBIGNUM(max)->len;
v = bignew(len,1);
while (len--) {
- BDIGITS(v)[len] = ((BDIGIT)~0) * rand;
+ BDIGITS(v)[len] = ((BDIGIT)~0) * rand_buf[len];
}
return rb_big_modulo((VALUE)v, max);