[前][次][番号順一覧][スレッド一覧]

ruby-changes:64439

From: zverok <ko1@a...>
Date: Tue, 22 Dec 2020 09:22:59 +0900 (JST)
Subject: [ruby-changes:64439] 861dbd9506 (master): Random instance methods

https://git.ruby-lang.org/ruby.git/commit/?id=861dbd9506

From 861dbd950684d311e4f4bfed0e14885ed8a90b53 Mon Sep 17 00:00:00 2001
From: zverok <zverok.offline@g...>
Date: Sun, 20 Dec 2020 22:06:26 +0200
Subject: Random instance methods


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) https://github.com/ruby/ruby/blob/trunk/random.c#L1716
     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");
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]