diff options
author | Benoit Daloze <[email protected]> | 2020-12-14 20:24:18 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-12-14 20:29:50 +0100 |
commit | f5c89c1660afd3a89514125aad579c0a96990c4b (patch) | |
tree | 119a4e2441a87c9d70870c0d5ad97e8f00f7869f /random.c | |
parent | c183288754fdad17e627c4182de599d965e99405 (diff) |
Deprecate Random::DEFAULT
* Closes [Feature #17351].
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |