aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/random.c b/random.c
index 3fef5cea3b..75f4dbaa21 100644
--- a/random.c
+++ b/random.c
@@ -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);
}