diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-27 13:28:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-27 13:28:31 +0000 |
commit | 2af1761466890a7621d908b0b4b0b19560543ba2 (patch) | |
tree | 600c3bae3e6d13f5d48ec12a1bc0b009b7d3ef75 | |
parent | 3406c5d61372e7b229cf2f925b89d5d9fd8728cd (diff) | |
download | ruby-2af1761466890a7621d908b0b4b0b19560543ba2.tar.gz |
random.c: Random.extend Formatter
* random.c (InitVM_Random): extend Random itself by Formatter
module, as well as the `bytes` method used by the module.
[Feature #4938]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | random.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1671,6 +1671,7 @@ InitVM_Random(void) /* Format raw random number as Random does */ VALUE m = rb_define_module_under(rb_cRandom, "Formatter"); rb_include_module(rb_cRandom, m); + rb_extend_object(rb_cRandom, m); rb_define_method(m, "random_number", rand_random_number, -1); rb_define_method(m, "rand", rand_random_number, -1); } |