diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2021-06-24 11:57:40 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2021-06-24 12:48:17 +0900 |
commit | 0fbdaaf7c91dd2ad09da3107d92fdce24eb21d42 (patch) | |
tree | 40f9d0e27b42dc451d01d91297208e3cfdf9b75c /random.c | |
parent | 31f4d262736c224a37e7c630a0790d40b11cdd57 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |