summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2021-06-24 11:57:40 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2021-06-24 12:48:17 +0900
commit0fbdaaf7c91dd2ad09da3107d92fdce24eb21d42 (patch)
tree40f9d0e27b42dc451d01d91297208e3cfdf9b75c /random.c
parent31f4d262736c224a37e7c630a0790d40b11cdd57 (diff)
rand_bytes: prefer rng->get_bytes
Because why not. There was no use case of rng->get_bytes before this changeset.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4602
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 a2f815791e..01796460dd 100644
--- a/random.c
+++ b/random.c
@@ -1196,7 +1196,7 @@ rand_bytes(const rb_random_interface_t *rng, rb_random_t *rnd, long n)
bytes = rb_str_new(0, n);
ptr = RSTRING_PTR(bytes);
- rb_rand_bytes_int32(rng->get_int32, rnd, ptr, n);
+ rng->get_bytes(rnd, ptr, n);
return bytes;
}