From 0fbdaaf7c91dd2ad09da3107d92fdce24eb21d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 24 Jun 2021 11:57:40 +0900 Subject: rand_bytes: prefer rng->get_bytes Because why not. There was no use case of rng->get_bytes before this changeset. --- random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'random.c') 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; } -- cgit v1.2.1