Flowdock
method

marshal_load

Importance_0
v1_9_3_392 - Show latest stable - 0 notes - Class: Rational
marshal_load(p1) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
static VALUE
nurat_marshal_load(VALUE self, VALUE a)
{
    get_dat1(self);
    Check_Type(a, T_ARRAY);
    if (RARRAY_LEN(a) != 2)
        rb_raise(rb_eArgError, "marshaled rational must have an array whose length is 2 but %ld", RARRAY_LEN(a));
    dat->num = RARRAY_PTR(a)[0];
    dat->den = RARRAY_PTR(a)[1];
    rb_copy_generic_ivar(self, a);

    if (f_zero_p(dat->den))
        rb_raise_zerodiv();

    return self;
}
Register or log in to add new notes.