summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index d3e1985f55..ae2a4fd8b1 100644
--- a/array.c
+++ b/array.c
@@ -7221,7 +7221,7 @@ rb_ary_sample(rb_execution_context_t *ec, VALUE ary, VALUE randgen, VALUE nv, VA
return rb_ary_new_capa(0);
case 1:
i = rnds[0];
- return rb_ary_new_from_values(1, &RARRAY_AREF(ary, i));
+ return rb_ary_new_from_args(1, RARRAY_AREF(ary, i));
case 2:
i = rnds[0];
j = rnds[1];