1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* bignum.c (rb_big_rand): should return positive random number.

[ruby-dev:25401]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2005-01-04 16:54:10 +00:00
parent febbeb8e64
commit c600bad492

View file

@ -2010,7 +2010,6 @@ rb_big_rand(max, rand_buf)
return rb_float_new(rand_buf[0]);
}
v = bignew(len,1);
RBIGNUM(v)->sign = RBIGNUM(max)->sign;
len--;
BDIGITS(v)[len] = BDIGITS(max)[len] * rand_buf[len];
while (len--) {