mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* random.c (random_rand): random integer can be a fixnum for
bignum range. [ruby-dev:39173] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fec3877e8d
commit
9460fd0ee0
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Aug 27 13:51:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* random.c (random_rand): random integer can be a fixnum for
|
||||
bignum range. [ruby-dev:39173]
|
||||
|
||||
Thu Aug 27 08:16:34 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/strscan/strscan.c (strscan_set_string): set string should not be
|
||||
|
|
2
random.c
2
random.c
|
@ -1055,7 +1055,7 @@ random_rand(int argc, VALUE *argv, VALUE obj)
|
|||
long x = FIX2LONG(beg) + FIX2LONG(v);
|
||||
return LONG2NUM(x);
|
||||
}
|
||||
switch (BUILTIN_TYPE(v)) {
|
||||
switch (TYPE(v)) {
|
||||
case T_BIGNUM:
|
||||
return rb_big_plus(v, beg);
|
||||
case T_FLOAT:
|
||||
|
|
Loading…
Reference in a new issue