summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2021-12-13 19:56:11 +0900
committerNobuyoshi Nakada <[email protected]>2021-12-13 19:56:11 +0900
commit446a11f2c1a1af007ef6079eada2d8992a13467f ()
tree6c746db5dfcd8e07576bd7f667f4c8a0f994e1eb
parentdc490aced3fc62d7eaa10d2bfc2211da826ea538 (diff)
[DOC] Add call sequences of Random using a range
-rw-r--r--random.c13
1 files changed, 9 insertions, 4 deletions
@@ -1533,10 +1533,12 @@ rand_random(int argc, VALUE *argv, VALUE obj, rb_random_t *rnd)
/*
* call-seq:
- * prng.random_number -> float
- * prng.random_number(max) -> number
- * prng.rand -> float
- * prng.rand(max) -> number
*
* Generates formatted random number from raw random bytes.
* See Random#rand.
@@ -1641,6 +1643,7 @@ rb_f_rand(int argc, VALUE *argv, VALUE obj)
* call-seq:
* Random.rand -> float
* Random.rand(max) -> number
*/
static VALUE
@@ -1812,8 +1815,10 @@ InitVM_Random(void)
*
* prng.random_number #=> 0.5816771641321361
* prng.random_number(1000) #=> 485
* prng.rand #=> 0.5816771641321361
* prng.rand(1000) #=> 485
*/
VALUE m = rb_define_module_under(rb_cRandom, "Formatter");
rb_include_module(base, m);