diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-30 12:45:51 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-30 12:45:51 +0000 |
commit | 6937a3e26f15199cb2c2cd180f2e83d941eaad8b (patch) | |
tree | 23752e3b95388e860c8be2950f5d768bac0c8b14 /random.c | |
parent | df878f78c5c53137f1fad3c494362b6d821f8dc1 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |