summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/array.c b/array.c
index b506b086d4..9e15e9aa58 100644
--- a/array.c
+++ b/array.c
@@ -3748,7 +3748,7 @@ static VALUE sym_random;
static VALUE
rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary)
{
- VALUE *ptr, opts, randgen = Qnil;
+ VALUE *ptr, opts, randgen = rb_cRandom;
long i = RARRAY_LEN(ary);
if (OPTHASH_GIVEN_P(opts)) {
@@ -3811,7 +3811,7 @@ static VALUE
rb_ary_sample(int argc, VALUE *argv, VALUE ary)
{
VALUE nv, result, *ptr;
- VALUE opts, randgen = Qnil;
+ VALUE opts, randgen = rb_cRandom;
long n, len, i, j, k, idx[10];
len = RARRAY_LEN(ary);