summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 03:38:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 03:38:10 (GMT)
commit876bfc6b4ee6c0ddacbeff328dc428889d789a6b (patch)
tree88bb8bfaea318a50351ce4db76ac08683214eb95 /random.c
parent255adda52fcd161f62fd75eec9504200e6b6eea8 (diff)
Init functions don't need ID caches
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/random.c b/random.c
index 23e84ff..b631d77 100644
--- a/random.c
+++ b/random.c
@@ -1352,7 +1352,7 @@ rb_reset_random_seed(void)
*/
void
-Init_Random(void)
+InitVM_Random(void)
{
Init_RandomSeed2();
rb_define_global_function("srand", rb_f_srand, -1);
@@ -1383,7 +1383,14 @@ Init_Random(void)
rb_define_singleton_method(rb_cRandom, "new_seed", random_seed, 0);
rb_define_private_method(CLASS_OF(rb_cRandom), "state", random_s_state, 0);
rb_define_private_method(CLASS_OF(rb_cRandom), "left", random_s_left, 0);
+}
+#undef rb_intern
+void
+Init_Random(void)
+{
id_rand = rb_intern("rand");
id_bytes = rb_intern("bytes");
+
+ InitVM(Random);
}