mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (rb_big_rand): removed. [ruby-dev:25405]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0f041a279
commit
36941b8465
3 changed files with 4 additions and 20 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Oct 1 12:57:02 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* bignum.c (rb_big_rand): removed. [ruby-dev:25405]
|
||||
|
||||
Sat Oct 1 01:46:51 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/open-uri.rb (OpenURI.open_loop): prohibit multiple proxy
|
||||
|
|
19
bignum.c
19
bignum.c
|
@ -1934,25 +1934,6 @@ rb_big_abs(VALUE x)
|
|||
return x;
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_big_rand(VALUE max, double *rand_buf)
|
||||
{
|
||||
VALUE v;
|
||||
long len = RBIGNUM(max)->len;
|
||||
|
||||
if (BIGZEROP(max)) {
|
||||
return rb_float_new(rand_buf[0]);
|
||||
}
|
||||
v = bignew(len,1);
|
||||
len--;
|
||||
BDIGITS(v)[len] = BDIGITS(max)[len] * rand_buf[len];
|
||||
while (len--) {
|
||||
BDIGITS(v)[len] = ((BDIGIT)~0) * rand_buf[len];
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* big.size -> integer
|
||||
|
|
1
intern.h
1
intern.h
|
@ -108,7 +108,6 @@ VALUE rb_big_and(VALUE, VALUE);
|
|||
VALUE rb_big_or(VALUE, VALUE);
|
||||
VALUE rb_big_xor(VALUE, VALUE);
|
||||
VALUE rb_big_lshift(VALUE, VALUE);
|
||||
VALUE rb_big_rand(VALUE, double*);
|
||||
/* class.c */
|
||||
VALUE rb_class_boot(VALUE);
|
||||
VALUE rb_class_new(VALUE);
|
||||
|
|
Loading…
Reference in a new issue