aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-12-14 20:24:18 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-12-14 20:29:50 +0100
commitf5c89c1660afd3a89514125aad579c0a96990c4b (patch)
tree119a4e2441a87c9d70870c0d5ad97e8f00f7869f /random.c
parentc183288754fdad17e627c4182de599d965e99405 (diff)
downloadruby-f5c89c1660afd3a89514125aad579c0a96990c4b.tar.gz
Deprecate Random::DEFAULT
* Closes [Feature #17351].
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/random.c b/random.c
index 9d33e21d11..d05f3f77c2 100644
--- a/random.c
+++ b/random.c
@@ -61,6 +61,7 @@
#include "internal/numeric.h"
#include "internal/random.h"
#include "internal/sanitizers.h"
+#include "internal/variable.h"
#include "ruby_atomic.h"
#include "ruby/random.h"
#include "ruby/ractor.h"
@@ -1716,6 +1717,7 @@ InitVM_Random(void)
rb_define_method(rb_cRandom, "==", rand_mt_equal, 1);
rb_define_const(rb_cRandom, "DEFAULT", rb_cRandom);
+ rb_deprecate_constant(rb_cRandom, "DEFAULT");
rb_define_singleton_method(rb_cRandom, "srand", rb_f_srand, -1);
rb_define_singleton_method(rb_cRandom, "rand", random_s_rand, -1);