summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--random.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/random.c b/random.c
index 65db49d..72b0f46 100644
--- a/random.c
+++ b/random.c
@@ -1544,13 +1544,10 @@ Init_Random_default(void)
{
rb_random_t *r = &default_rand;
struct MT *mt = &r->mt;
- VALUE v;
+ VALUE v = TypedData_Wrap_Struct(rb_cRandom, &random_data_type, r);
- r->seed = init_randomseed(mt);
- rb_global_variable(&r->seed);
-
- v = TypedData_Wrap_Struct(rb_cRandom, &random_data_type, r);
rb_gc_register_mark_object(v);
+ r->seed = init_randomseed(mt);
return v;
}