summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 12:45:51 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 12:45:51 +0000
commit6937a3e26f15199cb2c2cd180f2e83d941eaad8b (patch)
tree23752e3b95388e860c8be2950f5d768bac0c8b14 /random.c
parentdf878f78c5c53137f1fad3c494362b6d821f8dc1 (diff)
* random.c (random_bytes): use NUM2LONG instead of FIX2LONG because
Random#bytes may receive bignum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index c3fce95311..bfdfaf6f3c 100644
--- a/random.c
+++ b/random.c
@@ -797,7 +797,7 @@ rb_random_real(VALUE obj)
static VALUE
random_bytes(VALUE obj, VALUE len)
{
- return rb_random_bytes(obj, FIX2LONG(rb_to_int(len)));
+ return rb_random_bytes(obj, NUM2LONG(rb_to_int(len)));
}
VALUE