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:
parent
febbeb8e64
commit
c600bad492
1 changed files with 0 additions and 1 deletions
1
bignum.c
1
bignum.c
|
|
@ -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--) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue