method
initialize_copy
v1_9_3_392 -
Show latest stable
- Class:
Random
initialize_copy(p1)public
No documentation available.
static VALUE
random_copy(VALUE obj, VALUE orig)
{
rb_random_t *rnd1 = get_rnd(obj);
rb_random_t *rnd2 = get_rnd(orig);
struct MT *mt = &rnd1->mt;
*rnd1 = *rnd2;
mt->next = mt->state + numberof(mt->state) - mt->left + 1;
return obj;
}