diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-15 00:52:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-09-07 20:08:01 +0900 |
commit | d6ec0ef59b4c7c95beaad09f77cb5f86a0901b97 (patch) | |
tree | 66d692d6abe2f2bb3c7c620544ba266b578d7909 /random.c | |
parent | c449b9b02f63cf8268a0eb9639a43caf4598996d (diff) |
Added `get_real` interface
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3024
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -989,6 +989,7 @@ random_real(VALUE obj, rb_random_t *rnd, int excl) } else { const rb_random_interface_t *rng = try_rand_if(obj, rnd); + if (rng->get_real) return rng->get_real(rnd, excl); a = random_int32(rng, rnd); b = random_int32(rng, rnd); } |