summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authorzverok <zverok.offline@gmail.com>2020-12-20 22:06:26 +0200
committerMarc-André Lafortune <github@marc-andre.ca>2020-12-21 19:22:38 -0500
commit861dbd950684d311e4f4bfed0e14885ed8a90b53 (patch)
treef19b9f5f790a40862ecab319c894b0ce0e438e5a /random.c
parent4728c0d900f40036757d869fd5f20673c563bac7 (diff)
Random instance methods
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3966
Diffstat (limited to 'random.c')
-rw-r--r--random.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/random.c b/random.c
index d05f3f7..29491fa 100644
--- a/random.c
+++ b/random.c
@@ -1716,6 +1716,13 @@ InitVM_Random(void)
rb_define_private_method(rb_cRandom, "left", rand_mt_left, 0);
rb_define_method(rb_cRandom, "==", rand_mt_equal, 1);
+#if 0 /* for RDoc: it can't handle unnamed base class */
+ rb_define_method(rb_cRandom, "initialize", random_init, -1);
+ rb_define_method(rb_cRandom, "rand", random_rand, -1);
+ rb_define_method(rb_cRandom, "bytes", random_bytes, 1);
+ rb_define_method(rb_cRandom, "seed", random_get_seed, 0);
+#endif
+
rb_define_const(rb_cRandom, "DEFAULT", rb_cRandom);
rb_deprecate_constant(rb_cRandom, "DEFAULT");