method

initialize_copy

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: Date
initialize_copy(p1) public

No documentation

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

Hide source
static VALUE
d_lite_initialize_copy(VALUE copy, VALUE date)
{
    rb_check_frozen(copy);
    rb_check_trusted(copy);

    if (copy == date)
        return copy;
    {
        get_d2(copy, date);
        if (simple_dat_p(bdat)) {
            adat->s = bdat->s;
            adat->s.flags &= ~COMPLEX_DAT;
        }
        else {
            if (!complex_dat_p(adat))
                rb_raise(rb_eArgError,
                         "cannot load complex into simple");

            adat->c = bdat->c;
            adat->c.flags |= COMPLEX_DAT;
        }
    }
    return copy;
}
Register or log in to add new notes.