diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-03 03:38:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-03 03:38:10 +0000 |
commit | 876bfc6b4ee6c0ddacbeff328dc428889d789a6b (patch) | |
tree | 88bb8bfaea318a50351ce4db76ac08683214eb95 /random.c | |
parent | 255adda52fcd161f62fd75eec9504200e6b6eea8 (diff) | |
download | ruby-876bfc6b4ee6c0ddacbeff328dc428889d789a6b.tar.gz |
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.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); } |