diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-14 14:45:23 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-15 12:09:26 +0900 |
commit | ff30358d13d24d8202f2717c43700be70bdd49d3 (patch) | |
tree | 32757f4895a67fefcfb4830e40e2206a7ac388f7 /array.c | |
parent | 72d0f2f0e0546a4c7c3b9ec85d3f67a36e9c5038 (diff) | |
download | ruby-ff30358d13d24d8202f2717c43700be70bdd49d3.tar.gz |
RARRAY_AREF: convert into an inline function
RARRAY_AREF has been a macro for reasons. We might not be able to
change that for public APIs, but why not relax the situation internally
to make it an inline function.
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |