Method: Random#marshal_dump

Defined in:
random.c

#marshal_dumpObject (private)

:nodoc:

[View source]

763
764
765
766
767
768
769
770
771
772
773
774
# File 'random.c', line 763

static VALUE
rand_mt_dump(VALUE obj)
{
    rb_random_mt_t *rnd = rb_check_typeddata(obj, &random_mt_type);
    VALUE dump = rb_ary_new2(3);

    rb_ary_push(dump, mt_state(&rnd->mt));
    rb_ary_push(dump, INT2FIX(rnd->mt.left));
    rb_ary_push(dump, rnd->base.seed);

    return dump;
}