summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
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